mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Prevent typing pipes in the script editor
This prevents users from being confused whenever they type a pipe in the script editor, then save the level and load it again and see their script lines unexpectedly splitting in two. Now if you attempt to type a pipe, it simply won't happen at all. Fixes #379.
This commit is contained in:
@@ -4186,6 +4186,9 @@ void editorinput()
|
|||||||
ed.keydelay=6;
|
ed.keydelay=6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove all pipes, they are the line separator in the XML
|
||||||
|
key.keybuffer.erase(std::remove(key.keybuffer.begin(), key.keybuffer.end(), '|'), key.keybuffer.end());
|
||||||
|
|
||||||
ed.sb[ed.pagey+ed.sby]=key.keybuffer;
|
ed.sb[ed.pagey+ed.sby]=key.keybuffer;
|
||||||
ed.sbx = utf8::unchecked::distance(ed.sb[ed.pagey+ed.sby].begin(), ed.sb[ed.pagey+ed.sby].end());
|
ed.sbx = utf8::unchecked::distance(ed.sb[ed.pagey+ed.sby].begin(), ed.sb[ed.pagey+ed.sby].end());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user