Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid initializing ncurses before parsing options #385

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/tig.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,6 @@ main(int argc, const char *argv[])
if (load_refs(FALSE) == ERR)
die("Failed to load refs.");

init_display();

if (pager_mode)
request = open_pager_mode(request);

Expand Down
6 changes: 6 additions & 0 deletions src/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,15 @@ split_view(struct view *prev, struct view *view)
void
maximize_view(struct view *view, bool redraw)
{
static bool display_initialized;

memset(display, 0, sizeof(display));
current_view = 0;
display[current_view] = view;
if (!display_initialized) {
init_display();
display_initialized = true;
}
resize_display();
if (redraw) {
redraw_display(FALSE);
Expand Down