mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-02-01 21:55:01 +01: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:
parent
25f27d502a
commit
695e720c1c
1 changed files with 3 additions and 0 deletions
|
@ -4186,6 +4186,9 @@ void editorinput()
|
|||
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.sbx = utf8::unchecked::distance(ed.sb[ed.pagey+ed.sby].begin(), ed.sb[ed.pagey+ed.sby].end());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue