summaryrefslogtreecommitdiff
path: root/src/textbuf_type.h
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2013-08-05 20:35:27 +0000
committermichi_cc <michi_cc@openttd.org>2013-08-05 20:35:27 +0000
commite7dc14b25af4b2802a956dd1cd99c187fb4acb56 (patch)
treec9fcb2f1af8e1ec6d5d6ebe03d4c30eb00eb1fed /src/textbuf_type.h
parent33f3cf3a5daeaf9e6e5b5414696f93676249bc41 (diff)
downloadopenttd-e7dc14b25af4b2802a956dd1cd99c187fb4acb56.tar.xz
(svn r25652) -Fix: Improve text caret movement for complex scripts.
Diffstat (limited to 'src/textbuf_type.h')
-rw-r--r--src/textbuf_type.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/textbuf_type.h b/src/textbuf_type.h
index b9d3d1a34..611d7e443 100644
--- a/src/textbuf_type.h
+++ b/src/textbuf_type.h
@@ -14,6 +14,7 @@
#include "string_type.h"
#include "strings_type.h"
+#include "string_base.h"
/**
* Return values for Textbuf::HandleKeypress
@@ -61,6 +62,8 @@ struct Textbuf {
void UpdateSize();
private:
+ StringIterator *char_iter;
+
bool CanDelChar(bool backspace);
WChar GetNextDelChar(bool backspace);
void DelChar(bool backspace);
@@ -69,6 +72,7 @@ private:
bool CanMoveCaretRight();
WChar MoveCaretRight();
+ void UpdateStringIter();
void UpdateWidth();
void UpdateCaretPosition();
};