diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-03-07 01:05:51 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-03-07 01:05:51 +0000 |
| commit | 19f5eb65e882e878ea3e5f7c6c4443e9565781e7 (patch) | |
| tree | 824b2a0e9c5c03af003f3b90b34d59f3d491e69b /src | |
| parent | 03760e5ba16ae064d64eae4d4cde66f25ce5294a (diff) | |
Clamp cursor position on buffer reloading
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.cc b/src/client.cc index 81495d91..1fcd5e3e 100644 --- a/src/client.cc +++ b/src/client.cc @@ -95,7 +95,7 @@ static void reload_buffer(Context& context, const String& filename) if (not buf) return; context.change_buffer(*buf); - context.selections() = SelectionList{cursor_pos}; + context.selections() = SelectionList{buf->clamp(cursor_pos)}; context.window().set_position(view_pos); context.print_status({ "'" + buf->display_name() + "' reloaded", get_color("Information") }); |
