Skip to content

Conversation

tarruda
Copy link
Member

@tarruda tarruda commented Sep 8, 2015

The goal of this PR is to fix bugs tagged "milestone:0.1-first-public-release"

@@ -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)
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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?

👍

@@ -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
Copy link
Member

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).

Copy link
Member Author

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)

@justinmk
Copy link
Member

#3016 is another one that 49a850c should fix.

@tarruda
Copy link
Member Author

tarruda commented Sep 15, 2015

@oni-link continuing the conversation from a rebased commit, you asked:

Groups of 'maxcombine' combining characters. What does vim do? Drop the remaining characters?

From the 'maxcombine' help:

The default is OK for most languages. Hebrew may require 4.
Maximum value is 6.

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 */

@Tranquility
Copy link
Contributor

This PR fixes junegunn/fzf#206 for me.

@tarruda
Copy link
Member Author

tarruda commented Sep 18, 2015

@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.
@tarruda tarruda merged commit e897cca into neovim:master Sep 18, 2015
tarruda added a commit that referenced this pull request Sep 18, 2015
@jszakmeister jszakmeister removed the WIP label Sep 18, 2015
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 18, 2015
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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 19, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 24, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 25, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 26, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 26, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Sep 27, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Oct 1, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Oct 3, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Oct 5, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Oct 8, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
ZyX-I added a commit to ZyX-I/neovim that referenced this pull request Oct 8, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
mgraczyk pushed a commit to mgraczyk/neovim that referenced this pull request Nov 2, 2015
Problem that led to this skip was fixed in [neovim#3309][1].

[1]: neovim@0a116c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants