cursor position fix

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@126 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-19 16:51:41 +00:00
parent 031a0b376e
commit fc4ae65e28
-1
View File
@@ -198,7 +198,6 @@ size_t index_to_cursor(const String& str, size_t index, Movement dir) {
} }
} }
if (cursor == 0) return 0; if (cursor == 0) return 0;
if (i == str.size()) return cursor;
if (dir == MOVE_LEFT) return cursor - 1; if (dir == MOVE_LEFT) return cursor - 1;
if (dir == MOVE_RIGHT) return cursor - (start == index); if (dir == MOVE_RIGHT) return cursor - (start == index);
// which is nearer? start or end? // which is nearer? start or end?