diff options
author | nyamatongwe <unknown> | 2002-09-13 00:10:56 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-09-13 00:10:56 +0000 |
commit | a376dd1b83c3ff67097fde1388d016a82c7c6adb (patch) | |
tree | 291aca2e34ed8291a25ebf1b9f96b9ff2cb31c21 | |
parent | 6a945393a3c15b377bb39cea896d9fca14ade89f (diff) | |
download | scintilla-mirror-a376dd1b83c3ff67097fde1388d016a82c7c6adb.tar.gz |
Added ChooseCaretX.
-rw-r--r-- | include/Scintilla.h | 1 | ||||
-rw-r--r-- | include/Scintilla.iface | 3 | ||||
-rw-r--r-- | src/Editor.cxx | 12 |
3 files changed, 12 insertions, 4 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h index 30fcf50fc..7fe86fff1 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -480,6 +480,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_DELLINERIGHT 2396 #define SCI_SETXOFFSET 2397 #define SCI_GETXOFFSET 2398 +#define SCI_CHOOSECARETX 2399 #define SCI_GRABFOCUS 2400 #define CARET_SLOP 0x01 #define CARET_STRICT 0x04 diff --git a/include/Scintilla.iface b/include/Scintilla.iface index ff7251667..bcaf00ae6 100644 --- a/include/Scintilla.iface +++ b/include/Scintilla.iface @@ -1291,6 +1291,9 @@ fun void DelLineRight=2396(,) set void SetXOffset=2397(int newOffset,) get int GetXOffset=2398(,) +# Set the last x chosen value to be the caret x position +fun void ChooseCaretX=2399(,) + # Set the focus to this Scintilla widget. # GTK+ Specific. fun void GrabFocus=2400(,) diff --git a/src/Editor.cxx b/src/Editor.cxx index f2ba9f088..ac7e7bb76 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1555,15 +1555,15 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou char chDoc = pdoc->CharAt(charInDoc); styleByte = pdoc->StyleAt(charInDoc); if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) { - allSame = allSame && + allSame = allSame && (ll->styles[numCharsInLine] == static_cast<char>(styleByte & styleMask)); - allSame = allSame && + allSame = allSame && (ll->indicators[numCharsInLine] == static_cast<char>(styleByte & ~styleMask)); if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) - allSame = allSame && + allSame = allSame && (ll->chars[numCharsInLine] == static_cast<char>(toupper(chDoc))); else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) - allSame = allSame && + allSame = allSame && (ll->chars[numCharsInLine] == static_cast<char>(tolower(chDoc))); else allSame = allSame && @@ -4659,6 +4659,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETXOFFSET: return xOffset; + case SCI_CHOOSECARETX: + SetLastXChosen(); + break; + case SCI_SCROLLCARET: EnsureCaretVisible(); break; |