Remove insert_hide_sel option

This commit is contained in:
Maxime Coste 2013-12-15 14:57:55 +00:00
parent eb81eef03e
commit e369b60258
3 changed files with 3 additions and 10 deletions

View File

@ -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 completion. Support +option+ which use the +completions+ option, and
+word=all+ or +word=buffer+ which complete using words in all buffers +word=all+ or +word=buffer+ which complete using words in all buffers
(+word=all+) or only the current one (+word=buffer+) (+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 * +autoreload+ _yesnoask_: auto reload the buffers when an external
modification is detected. modification is detected.

View File

@ -373,7 +373,6 @@ void show_line_numbers(const Window& window, DisplayBuffer& display_buffer)
void highlight_selections(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<bool>();
const auto& buffer = window.buffer(); const auto& buffer = window.buffer();
for (size_t i = 0; i < window.selections().size(); ++i) 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()); BufferCoord end = forward ? sel.last() : buffer.char_next(sel.first());
const bool primary = (i == window.selections().main_index()); 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,
ColorPair sel_colors = get_color(primary ? "PrimarySelection" : "SecondarySelection"); [&](DisplayAtom& atom) { atom.colors = sel_colors; });
highlight_range(display_buffer, begin, end, false,
[&](DisplayAtom& atom) { atom.colors = sel_colors; });
}
ColorPair cur_colors = get_color(primary ? "PrimaryCursor" : "SecondaryCursor"); ColorPair cur_colors = get_color(primary ? "PrimaryCursor" : "SecondaryCursor");
highlight_range(display_buffer, sel.last(), buffer.char_next(sel.last()), false, highlight_range(display_buffer, sel.last(), buffer.char_next(sel.last()), false,
[&](DisplayAtom& atom) { atom.colors = cur_colors; }); [&](DisplayAtom& atom) { atom.colors = cur_colors; });

View File

@ -133,7 +133,6 @@ GlobalOptions::GlobalOptions()
if (not contains(values, v)) if (not contains(values, v))
throw runtime_error(v + " is not a recognised value for completers"); throw runtime_error(v + " is not a recognised value for completers");
}); });
declare_option<bool>("insert_hide_sel", false);
declare_option<YesNoAsk>("autoreload", Ask); declare_option<YesNoAsk>("autoreload", Ask);
} }