Permalink
Browse files

cancel selection before inserting char keys

  • Loading branch information...
1 parent 2788398 commit 28b8d1a9508212f43c22d483691571af0b2fb784 @NotFound committed Dec 14, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 examples/pokedit.winxed
View
@@ -565,6 +565,9 @@ class TextWindow : ChildWindow
break;
default:
key = self.LookupString(event);
+ if (key == null || length(key) == 0)
+ break;
+ self.cancelselected();
string line = text[curline];
l = length(line);
switch (key) {
@@ -600,7 +603,7 @@ class TextWindow : ChildWindow
curpos = l;
key = " " * (8 - (curpos % 8));
default:
- if (key == null || length(key) == 0 || ord(key) < ord(" "))
+ if (ord(key) < ord(" "))
break;
if (self.someselected())
self.cancelselected();

0 comments on commit 28b8d1a

Please sign in to comment.