From c768ff9b6f025ac656cebb5c98de84959203a2ff Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 9 Apr 2016 01:08:38 +0100 Subject: [PATCH] Small style tweak, we know buffer begin coord is always {0,0} --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 9a50ec46..35375c63 100644 --- a/src/main.cc +++ b/src/main.cc @@ -118,7 +118,7 @@ void register_env_vars() "cursor_byte_offset", false, [](StringView name, const Context& context) -> String { auto cursor = context.selections().main().cursor(); - return to_string(context.buffer().distance(context.buffer().begin().coord(), cursor)); } + return to_string(context.buffer().distance({0,0}, cursor)); } }, { "selection_desc", false, [](StringView name, const Context& context)