aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-01-13 01:10:10 +0000
committernyamatongwe <devnull@localhost>2002-01-13 01:10:10 +0000
commit7b0c5a98abfcd122f2f88d55b3c1b09391a1af8a (patch)
tree7a1bd0b59cc23e517090aed5a2616b4f0a2126ed /src/Document.cxx
parent3b8295dbe789457385284beafd3e8bd36359895a (diff)
downloadscintilla-mirror-7b0c5a98abfcd122f2f88d55b3c1b09391a1af8a.tar.gz
Added option to autocompletion AutoCSetDropRestOfWord which removes any
word characters following an insertion made by auto-completion. Bundled the changes made by an autocompletion into one undo action.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 8483d86f1..b7acc8610 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -722,13 +722,16 @@ Document::charClassification Document::WordCharClass(unsigned char ch) {
* Used by commmands that want to select whole words.
* Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0.
*/
-int Document::ExtendWordSelect(int pos, int delta) {
+int Document::ExtendWordSelect(int pos, int delta, bool onlyWordCharacters) {
+ charClassification ccStart = ccWord;
if (delta < 0) {
- charClassification ccStart = WordCharClass(cb.CharAt(pos-1));
+ if (!onlyWordCharacters)
+ ccStart = WordCharClass(cb.CharAt(pos-1));
while (pos > 0 && (WordCharClass(cb.CharAt(pos - 1)) == ccStart))
pos--;
} else {
- charClassification ccStart = WordCharClass(cb.CharAt(pos));
+ if (!onlyWordCharacters)
+ ccStart = WordCharClass(cb.CharAt(pos));
while (pos < (Length()) && (WordCharClass(cb.CharAt(pos)) == ccStart))
pos++;
}