mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Prevent removing line if there is only one line
This fixes another way you could end up typing on a non-existent line in the script editor. In a script with only 1 line, which is empty, the game would let you press backspace on it, removing the line. This results in you typing on a non-existent line. You will keep typing on it until you either close the script or press Up. If you press Up, you will be unable to get back to the non-existent line, for it doesn't exist - but the text you typed on the non-existent line will still be there, until you close the script and re-open it.
This commit is contained in:
parent
172ab9195d
commit
9b125ad8df
1 changed files with 2 additions and 2 deletions
|
@ -546,7 +546,7 @@ void editorclass::clearscriptbuffer()
|
|||
void editorclass::removeline(int t)
|
||||
{
|
||||
//Remove line t from the script
|
||||
if(sblength>0)
|
||||
if(sblength>1)
|
||||
{
|
||||
if(sblength==t)
|
||||
{
|
||||
|
@ -5387,4 +5387,4 @@ void editorinput( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, enti
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* NO_CUSTOM_LEVELS */
|
||||
#endif /* NO_CUSTOM_LEVELS */
|
||||
|
|
Loading…
Reference in a new issue