aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-04-08 11:59:28 +0000
committernyamatongwe <devnull@localhost>2000-04-08 11:59:28 +0000
commitefa40dbcc958f03b539902aae87c17b138552ce0 (patch)
treebca7871b6c92dd54755b6e613fb18eba0e28c021 /src/Editor.cxx
parent4fe90137dc48e5ca07e9223694ab8926c9ebbf13 (diff)
downloadscintilla-mirror-efa40dbcc958f03b539902aae87c17b138552ce0.tar.gz
Unicode keyboard input and dragging from Scintilla.
Fixing warnings on GTK+ and uping warning level.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 859421c92..677013a00 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1300,6 +1300,13 @@ void Editor::SetScrollBars() {
}
void Editor::AddChar(char ch) {
+ char s[2];
+ s[0] = ch;
+ s[1] = '\0';
+ AddCharUTF(s, 1);
+}
+
+void Editor::AddCharUTF(char *s, unsigned int len) {
bool wasSelection = currentPos != anchor;
ClearSelection();
if (inOverstrike && !wasSelection) {
@@ -1309,11 +1316,11 @@ void Editor::AddChar(char ch) {
}
}
}
- pdoc->InsertChar(currentPos, ch);
- SetEmptySelection(currentPos + 1);
+ pdoc->InsertString(currentPos, s, len);
+ SetEmptySelection(currentPos + len);
EnsureCaretVisible();
SetLastXChosen();
- NotifyChar(ch);
+ NotifyChar(s[0]);
}
void Editor::ClearSelection() {