File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# included by main.pro and lib.pro
22
3- VERSION = 2.6.1
3+ VERSION = 2.6.2
44JDLLVER = 9.7
55BUILDVERSION = 1
66
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ void Bedit::homeshift()
8585{
8686 QString ws=" \t " ;
8787 QTextCursor c = textCursor ();
88+ int sel = qMax (0 ,c.anchor () - c.position ());
8889 QString txt = c.block ().text ();
8990 int pos=getpositioninblock (c);
9091 txt = txt.left (pos);
@@ -95,7 +96,7 @@ void Bedit::homeshift()
9596 break ;
9697 }
9798 int cur=c.position ();
98- setselect (cur-pos+mov,pos-mov);
99+ setselect (cur-pos+mov,sel+ pos-mov);
99100}
100101
101102// ---------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -58,9 +58,12 @@ void Nedit::keyPressEvent(QKeyEvent *e)
5858 bool shift = mod.testFlag (Qt::ShiftModifier);
5959 bool ctrl = mod.testFlag (Qt::ControlModifier);
6060 int key = e->key ();
61- if (key==Qt::Key_Home && (ctrl==false ) && shift==false )
62- home ();
63- else
61+ if (key==Qt::Key_Home && (ctrl==false )) {
62+ if (shift==false )
63+ home ();
64+ else
65+ homeshift ();
66+ } else
6467 Bedit::keyPressEvent (e);
6568}
6669
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ void TextEdit::homeshift()
8989{
9090 QString ws=" \t " ;
9191 QTextCursor c = textCursor ();
92+ int sel = qMax (0 ,c.anchor () - c.position ());
9293 QString txt = c.block ().text ();
9394 int pos=getpositioninblock (c);
9495 txt = txt.left (pos);
@@ -99,7 +100,7 @@ void TextEdit::homeshift()
99100 break ;
100101 }
101102 int cur=c.position ();
102- setselect (cur-pos+mov,pos-mov);
103+ setselect (cur-pos+mov,sel+ pos-mov);
103104}
104105
105106// ---------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments