diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-06-13 07:11:03 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-06-13 07:11:03 +1000 |
| commit | 665d3fa196f4df905ebd682965adf78d80eaf8a8 (patch) | |
| tree | 793d9530759b9e16f9183c3cf7a2c1cfdc5de8a4 /src | |
| parent | ee19497d3787e1ec2f144dd33ea628d42af0f255 (diff) | |
Fix edit -fifo without -scroll when the buffer is already opened
Scrolling was taking place in that case even though it was not
desired.
Diffstat (limited to 'src')
| -rw-r--r-- | src/commands.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands.cc b/src/commands.cc index 213926f7..b196f847 100644 --- a/src/commands.cc +++ b/src/commands.cc @@ -266,7 +266,9 @@ void edit(const ParametersParser& parser, Context& context, const ShellContext&) if (buffer != current_buffer) context.change_buffer(*buffer); - if (param_count > 1 and not parser[1].empty()) + if (parser.get_switch("fifo") and not parser.get_switch("scroll")) + context.selections_write_only() = { *buffer, Selection{} }; + else if (param_count > 1 and not parser[1].empty()) { int line = std::max(0, str_to_int(parser[1]) - 1); int column = param_count > 2 and not parser[2].empty() ? |
