-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[WIP] Fixes for 0.1 #3309
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
[WIP] Fixes for 0.1 #3309
Conversation
@@ -234,8 +234,11 @@ static void ui_bridge_highlight_set_event(void **argv) | |||
|
|||
static void ui_bridge_put(UI *b, uint8_t *text, size_t size) |
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.
would FUNC_ATTR_NONNULL_ALL work?
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.
No, this function uses NULL in the second cell of double-width cells
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.
Should not it be FUNC_ATTR_NONNULL_ARG(1)
then?
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.
Should not it be FUNC_ATTR_NONNULL_ARG(1) then?
👍
9d4ae5e
to
49a850c
Compare
@@ -653,7 +653,7 @@ int searchit( | |||
} | |||
if (matchcol == 0 && (options & SEARCH_START)) | |||
break; | |||
if (ptr[matchcol] == NUL | |||
if (STRLEN(ptr) <= (size_t)matchcol || ptr[matchcol] == NUL |
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.
The STRLEN calculation could be moved out of the while-loop (above line 614).
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.
Did you see the comment below(at ml_get_buf
)? Even though it is theoretically getting the same line, is it guaranteed that ptr
will point to the same string? I'd rather not optimize this prematurely and risk introducing bugs, especially because vim is too complex and hard to have its state predicted after a non-trivial function is called(vim_regexec_multi
)
#3016 is another one that 49a850c should fix. |
0127946
to
508dc86
Compare
bbaff16
to
074035b
Compare
@oni-link continuing the conversation from a rebased commit, you asked:
From the
So I don't think it's possible to have more than 6, which is confirmed by the size of the global variable which stores combining chars: EXTERN u8char_T *ScreenLinesC[MAX_MCO]; /* composing characters */ |
074035b
to
4f5213f
Compare
a1ac68a
to
7c5b2c6
Compare
This PR fixes junegunn/fzf#206 for me. |
@4b98ea1e80bf changed how refcounts are handled internally to fit into job control semantics. Change the refcount check in `ex_delfunction` to consider this. Close neovim#3000
7c5b2c6
to
eef7218
Compare
@Tranquility great Since this PR already fixes quite a few issues, I will merge it later and continue working on the remaining 0.1 issues in a new PR |
Since vimscript can close buffers at any time, it is possible that a refresh_timer_cb will be called with an invalid buffer, but there's no way to detect this if only a reference is stored because the memory can be reused by the allocator. Use buf_T->handle which is guaranteed to be unique.
eef7218
to
e897cca
Compare
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
memcpy(t, text, size); | ||
uint8_t *t = NULL; | ||
if (text) { | ||
t = xmalloc(sizeof(((UCell *)0)->data)); |
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.
Interesting. http://stackoverflow.com/a/19786755/152142
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
Problem that led to this skip was fixed in [neovim#3309][1]. [1]: neovim@0a116c8
The goal of this PR is to fix bugs tagged "milestone:0.1-first-public-release"