diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-05-25 08:30:49 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-05-25 08:30:49 +0100 |
| commit | f014eb7052082f7a6760dbd2aec9204b0cb4e1dc (patch) | |
| tree | 0f657031a7492a4704343bd34513b65bd03e6fa5 /src | |
| parent | 3e4e4f6210b7f0ff0fdbe841dc8a68a330379eb9 (diff) | |
Fix command parsing bug when commenting after a command
When a comment was present directly on the same line after a command,
we did not correctly see the command as terminated and would join
continue parsing the next line.
Diffstat (limited to 'src')
| -rw-r--r-- | src/command_manager.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command_manager.cc b/src/command_manager.cc index 2af06c76..e2294b37 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -193,8 +193,8 @@ void skip_blanks_and_comments(Reader& reader) ++(++reader); else if (c == '#') { - for (bool eol = false; reader and not eol; ++reader) - eol = *reader == '\n'; + while (reader and *reader != '\n') + ++reader; } else break; |
