summaryrefslogtreecommitdiff
path: root/src/commands.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-12-15 14:25:23 +0000
committerMaxime Coste <frrrwww@gmail.com>2013-12-15 14:25:23 +0000
commit935bc3cec9707dcf95d978baa2bd323e22420b02 (patch)
tree231379350ff83ff31d783dfc786ed7c951603529 /src/commands.cc
parent9b6639eb2754a72d5f6ae35055b750da10b262c1 (diff)
Add Context::selections method, and use it in priority to the Editor's one
Diffstat (limited to 'src/commands.cc')
-rw-r--r--src/commands.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 5eaf0ab8..e0f9e535 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -127,7 +127,7 @@ void edit(CommandParameters params, Context& context)
int column = param_count > 2 and not parser[2].empty() ?
std::max(0, str_to_int(parser[2]) - 1) : 0;
- context.editor().selections() = context.buffer().clamp({ line, column });
+ context.selections() = context.buffer().clamp({ line, column });
if (context.has_window())
context.window().center_selection();
}
@@ -671,7 +671,7 @@ void info(CommandParameters params, Context& context)
if (parser.has_option("anchor"))
{
style = MenuStyle::Inline;
- const auto& sel = context.editor().selections().main();
+ const auto& sel = context.selections().main();
auto it = sel.last();
String anchor = parser.option_value("anchor");
if (anchor == "left")