From e369b60258ba48eeeb53a91d15e6ae1a9bb6f10f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 15 Dec 2013 14:57:55 +0000 Subject: [PATCH] Remove insert_hide_sel option --- README.asciidoc | 2 -- src/highlighters.cc | 10 +++------- src/option_manager.cc | 1 - 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/README.asciidoc b/README.asciidoc index cdc2abf5..a52b23f7 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -455,8 +455,6 @@ Some options are built in kakoune, and can be used to control it's behaviour: completion. Support +option+ which use the +completions+ option, and +word=all+ or +word=buffer+ which complete using words in all buffers (+word=all+) or only the current one (+word=buffer+) - * +insert_hide_sel+ _bool_: hide the selection (except the last - element) in insert mode * +autoreload+ _yesnoask_: auto reload the buffers when an external modification is detected. diff --git a/src/highlighters.cc b/src/highlighters.cc index 9c911ce1..3b8b273b 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -373,7 +373,6 @@ void show_line_numbers(const Window& window, DisplayBuffer& display_buffer) void highlight_selections(const Window& window, DisplayBuffer& display_buffer) { - const bool only_cursor = window.is_editing() and window.options()["insert_hide_sel"].get(); const auto& buffer = window.buffer(); for (size_t i = 0; i < window.selections().size(); ++i) { @@ -383,12 +382,9 @@ void highlight_selections(const Window& window, DisplayBuffer& display_buffer) BufferCoord end = forward ? sel.last() : buffer.char_next(sel.first()); const bool primary = (i == window.selections().main_index()); - if (not only_cursor) - { - ColorPair sel_colors = get_color(primary ? "PrimarySelection" : "SecondarySelection"); - highlight_range(display_buffer, begin, end, false, - [&](DisplayAtom& atom) { atom.colors = sel_colors; }); - } + ColorPair sel_colors = get_color(primary ? "PrimarySelection" : "SecondarySelection"); + highlight_range(display_buffer, begin, end, false, + [&](DisplayAtom& atom) { atom.colors = sel_colors; }); ColorPair cur_colors = get_color(primary ? "PrimaryCursor" : "SecondaryCursor"); highlight_range(display_buffer, sel.last(), buffer.char_next(sel.last()), false, [&](DisplayAtom& atom) { atom.colors = cur_colors; }); diff --git a/src/option_manager.cc b/src/option_manager.cc index 7eb9e7f5..4bb8d2da 100644 --- a/src/option_manager.cc +++ b/src/option_manager.cc @@ -133,7 +133,6 @@ GlobalOptions::GlobalOptions() if (not contains(values, v)) throw runtime_error(v + " is not a recognised value for completers"); }); - declare_option("insert_hide_sel", false); declare_option("autoreload", Ask); }