-
Notifications
You must be signed in to change notification settings - Fork 611
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
Log view fixes #1128
Log view fixes #1128
Conversation
if (code != SUCCESS) | ||
return code; | ||
|
||
watch_register(&view->watch, WATCH_HEAD | WATCH_REFS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, I just have a related question - I can't figure out how to make set refresh-mode = after-command
work. It doesn't refresh after I run :!echo
and type q
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must say that I don't use it either. Wondering if anyone does... WATCH_EVENT_AFTER_COMMAND seems to be trigged only after opening an editor or running a command requiring confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehm, yeah, the refresh code is really buggy unfortunately. It probably needs to be completely redesigned. Might be better to rip it out.
src/draw.c
Outdated
@@ -543,12 +543,13 @@ view_column_draw(struct view *view, struct line *line, unsigned int lineno) | |||
{ | |||
enum line_type type = line->type; | |||
const char *text = column_data.text; | |||
size_t indent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be initialized since we only set it to get_graph_indent(text)
if line->graph_indent
is non-zero?
size_t indent; | |
size_t indent = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both the initialisation and the use are conditioned by line->graph_indent
but, agreed, it never hurts to initialise a variable in case someone wants to use it in the future and misses this condition.
if (code != SUCCESS) | ||
return code; | ||
|
||
watch_register(&view->watch, WATCH_HEAD | WATCH_REFS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehm, yeah, the refresh code is really buggy unfortunately. It probably needs to be completely redesigned. Might be better to rip it out.
db9f856
to
d15c917
Compare
d15c917
to
9588352
Compare
No description provided.