mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
separator can no longer be selected
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@132 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -521,12 +521,14 @@ void TextValueEditor::fixSelection(IndexType t, Movement dir) {
|
||||
size_t seppos = val.find(_("<sep"));
|
||||
while (seppos != String::npos) {
|
||||
size_t sepend = skip_tag(val,match_close_tag(val, seppos));
|
||||
if ((selection_start_i <= seppos && selection_end_i > seppos) ||
|
||||
(selection_start_i >= sepend && selection_end_i < sepend)) {
|
||||
if (selection_start_i <= seppos && selection_end_i > seppos) {
|
||||
// not on same side, move selection end before sep
|
||||
//selection_end = cursor_to_index(val, index_to_cursor(val, seppos));
|
||||
selection_end = index_to_cursor(val, seppos, dir);
|
||||
selection_end_i = cursor_to_index(val, selection_end);
|
||||
} else if (selection_start_i >= sepend && selection_end_i < sepend) {
|
||||
// not on same side, move selection end after sep
|
||||
selection_end = index_to_cursor(val, sepend, dir);
|
||||
selection_end_i = cursor_to_index(val, selection_end);
|
||||
}
|
||||
// find next separator
|
||||
seppos = val.find(_("<sep"), seppos + 1);
|
||||
|
||||
Reference in New Issue
Block a user