- fix: option "Move caret to the first non-space char in the current line when press HOME key" dosen't work fine.

This commit is contained in:
royqh1979@gmail.com 2021-11-20 08:12:10 +08:00
parent 49a2a59964
commit b034d27eb9
2 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,7 @@ Version 0.9.2 For Dev-C++ 7 Beta
- fix: gutter of the disassembly code control in the cpu info dialog is grayed - fix: gutter of the disassembly code control in the cpu info dialog is grayed
- fix: problem set & problem views not correctly hidden when disabled in the executor / problem set options - fix: problem set & problem views not correctly hidden when disabled in the executor / problem set options
- fix: executor / problem set options not correctly saved - fix: executor / problem set options not correctly saved
- fix: option "Move caret to the first non-space char in the current line when press HOME key" dosen't work fine.
Version 0.9.1 For Dev-C++ 7 Beta Version 0.9.1 For Dev-C++ 7 Beta
- enhancement: code completion suggestion for "__func__" variable - enhancement: code completion suggestion for "__func__" variable

View File

@ -4652,7 +4652,7 @@ void SynEdit::moveCaretToLineStart(bool isSelection)
{ {
int newX; int newX;
// home key enhancement // home key enhancement
if (mOptions.testFlag(SynEditorOption::eoEnhanceHomeKey) && (lineToRow(mCaretY) == displayY())) { if (mOptions.testFlag(SynEditorOption::eoEnhanceHomeKey)) {
QString s = mLines->getString(mCaretY - 1); QString s = mLines->getString(mCaretY - 1);
int first_nonblank = 0; int first_nonblank = 0;
@ -4660,11 +4660,10 @@ void SynEdit::moveCaretToLineStart(bool isSelection)
while ((first_nonblank < vMaxX) && (s[first_nonblank] == ' ' || s[first_nonblank] == '\t')) { while ((first_nonblank < vMaxX) && (s[first_nonblank] == ' ' || s[first_nonblank] == '\t')) {
first_nonblank++; first_nonblank++;
} }
newX = mCaretX; newX = mCaretX;
if (newX > first_nonblank) if (newX > first_nonblank+1)
newX = first_nonblank; newX = first_nonblank+1;
else else
newX = 1; newX = 1;
} else } else