Skip to content

Commit

Permalink
vis: properly set initial window ui options
Browse files Browse the repository at this point in the history
This should keep the EOF markers visible when another option is enabled.
The whole UI option handling is a bit of a mess. In the longterm more of
the drawing code should be moved into Lua.
  • Loading branch information
martanne committed Jun 27, 2017
1 parent 431dea6 commit 477fee9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion view.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ View *view_new(Text *text) {
.data = " ",
};
view->tabwidth = 8;
view_options_set(view, UI_OPTION_SYMBOL_EOF);
view_options_set(view, 0);

if (!view_resize(view, 1, 1)) {
view_free(view);
Expand Down
3 changes: 2 additions & 1 deletion vis.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ Win *window_new_file(Vis *vis, File *file, enum UiOption options) {
return NULL;
}
file->refcount++;
view_options_set(win->view, view_options_get(win->view));
view_tabwidth_set(win->view, vis->tabwidth);

if (vis->windows)
Expand Down Expand Up @@ -574,7 +575,7 @@ bool vis_window_new(Vis *vis, const char *filename) {
File *file = file_new(vis, filename);
if (!file)
return false;
Win *win = window_new_file(vis, file, UI_OPTION_STATUSBAR);
Win *win = window_new_file(vis, file, UI_OPTION_STATUSBAR|UI_OPTION_SYMBOL_EOF);
if (!win) {
file_free(vis, file);
return false;
Expand Down

0 comments on commit 477fee9

Please sign in to comment.