Remove padding control options from ncurses ui
This commit is contained in:
parent
f6d363c607
commit
064e965500
|
@ -363,17 +363,11 @@ void NCursesUI::draw(const DisplayBuffer& display_buffer,
|
||||||
}
|
}
|
||||||
|
|
||||||
set_face(m_window, padding_face, default_face);
|
set_face(m_window, padding_face, default_face);
|
||||||
|
|
||||||
const DisplayLine padding_line = m_buffer_padding_str;
|
|
||||||
const DisplayLine* padding_line_ptr = m_buffer_padding_type != BufferPaddingType::None ?
|
|
||||||
&padding_line : &empty_line;
|
|
||||||
while (line_index < m_dimensions.line + (m_status_on_top ? 1 : 0))
|
while (line_index < m_dimensions.line + (m_status_on_top ? 1 : 0))
|
||||||
{
|
{
|
||||||
wmove(m_window, (int)line_index++, 0);
|
wmove(m_window, (int)line_index++, 0);
|
||||||
wclrtoeol(m_window);
|
wclrtoeol(m_window);
|
||||||
draw_line(m_window, *padding_line_ptr, 0, m_dimensions.column, padding_face);
|
waddch(m_window, '~');
|
||||||
if (m_buffer_padding_type == BufferPaddingType::Single)
|
|
||||||
padding_line_ptr = &empty_line;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
|
@ -991,20 +985,6 @@ void NCursesUI::set_ui_options(const Options& options)
|
||||||
m_wheel_down_button = wheel_down_it != options.end() ?
|
m_wheel_down_button = wheel_down_it != options.end() ?
|
||||||
str_to_int_ifp(wheel_down_it->value).value_or(5) : 5;
|
str_to_int_ifp(wheel_down_it->value).value_or(5) : 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
auto padding_str_it = options.find("ncurses_buffer_padding_str");
|
|
||||||
m_buffer_padding_str = padding_str_it == options.end() or !padding_str_it->value.length() ?
|
|
||||||
"~" : padding_str_it->value;
|
|
||||||
|
|
||||||
auto padding_type_it = options.find("ncurses_buffer_padding_type");
|
|
||||||
if (padding_type_it == options.end() or padding_type_it->value == "fill")
|
|
||||||
m_buffer_padding_type = BufferPaddingType::Fill;
|
|
||||||
else if (padding_type_it->value == "single")
|
|
||||||
m_buffer_padding_type = BufferPaddingType::Single;
|
|
||||||
else
|
|
||||||
m_buffer_padding_type = BufferPaddingType::None;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,6 @@ namespace Kakoune
|
||||||
|
|
||||||
struct NCursesWin;
|
struct NCursesWin;
|
||||||
|
|
||||||
enum BufferPaddingType { None, Single, Fill };
|
|
||||||
|
|
||||||
class NCursesUI : public UserInterface
|
class NCursesUI : public UserInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -129,9 +127,6 @@ private:
|
||||||
int m_wheel_up_button = 4;
|
int m_wheel_up_button = 4;
|
||||||
int m_wheel_down_button = 5;
|
int m_wheel_down_button = 5;
|
||||||
|
|
||||||
String m_buffer_padding_str = "~";
|
|
||||||
BufferPaddingType m_buffer_padding_type = BufferPaddingType::None;
|
|
||||||
|
|
||||||
bool m_set_title = true;
|
bool m_set_title = true;
|
||||||
|
|
||||||
bool m_dirty = false;
|
bool m_dirty = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user