-
-
Couldn't load subscription status.
- Fork 5.9k
Also free qf_last_bufname in ll_new_list #1729
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
Conversation
|
Build failure seems unrelated?! |
|
restarted filed travis job, did run successfully this time |
Codecov Report
@@ Coverage Diff @@
## master #1729 +/- ##
==========================================
+ Coverage 68.21% 74.96% +6.75%
==========================================
Files 76 76
Lines 124299 124911 +612
==========================================
+ Hits 84788 93639 +8851
+ Misses 39511 31272 -8239
Continue to review full report at Codecov.
|
|
Christian Brabandt wrote:
restarted filed travis job, did run successfully this time
Ehm, does that mean the patch is not needed? I guess it's not, since it
always worked without it before.
…--
If you had to identify, in one word, the reason why the
human race has not achieved, and never will achieve, its
full potential, that word would be "meetings."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
@brammool |
|
@brammool |
|
@brammool I just restarted the test, since the failure seemed unrelated as suggested by Daniel. Since the test all run successful, that means the patch at least did not break anything obvious. That doesn't mean, the fix isn't needed. |
|
Yes, logs are gone after you restart the job. |
|
Daniel Hahler wrote:
@brammool
#1728 fixed the simple test case I factored out of Neomake's test suite, but it was not enough to really fix it.
This PR fixes it, but I have not factored out a test for it, since it seemed to also be not required for merging the last fix in this regard.
It might still miss some creation of new location/quickfix lists, but at least it now does not need manual cache busting in the Neomake test suite anymore.
Can you explain what this fixes? Ideally with a reproducible example.
I don't like adding code that seems arbitrary placed. And might still
not catch all situatons.
I was thinking that the bufref needs to be made more robust. It might
be sufficient to check the buffer number:
*** ../vim-8.0.0606/src/structs.h 2017-04-07 19:50:08.687049344 +0200
--- src/structs.h 2017-05-30 22:21:52.526534895 +0200
***************
*** 69,79 ****
typedef int scid_T; /* script ID */
typedef struct file_buffer buf_T; /* forward declaration */
! /* Reference to a buffer that stores the value of buf_free_count.
* bufref_valid() only needs to check "buf" when the count differs.
*/
typedef struct {
buf_T *br_buf;
int br_buf_free_count;
} bufref_T;
…--- 69,81 ----
typedef int scid_T; /* script ID */
typedef struct file_buffer buf_T; /* forward declaration */
! /*
! * Reference to a buffer that stores the value of buf_free_count.
* bufref_valid() only needs to check "buf" when the count differs.
*/
typedef struct {
buf_T *br_buf;
+ int br_fnum;
int br_buf_free_count;
} bufref_T;
*** ../vim-8.0.0606/src/buffer.c 2017-03-16 17:23:26.811815956 +0100
--- src/buffer.c 2017-05-30 22:24:52.941382293 +0200
***************
*** 372,389 ****
set_bufref(bufref_T *bufref, buf_T *buf)
{
bufref->br_buf = buf;
bufref->br_buf_free_count = buf_free_count;
}
/*
* Return TRUE if "bufref->br_buf" points to a valid buffer.
* Only goes through the buffer list if buf_free_count changed.
*/
int
bufref_valid(bufref_T *bufref)
{
return bufref->br_buf_free_count == buf_free_count
! ? TRUE : buf_valid(bufref->br_buf);
}
/*
--- 372,393 ----
set_bufref(bufref_T *bufref, buf_T *buf)
{
bufref->br_buf = buf;
+ bufref->br_fnum = buf->b_fnum;
bufref->br_buf_free_count = buf_free_count;
}
/*
* Return TRUE if "bufref->br_buf" points to a valid buffer.
* Only goes through the buffer list if buf_free_count changed.
+ * Also checks if b_fnum is still the same, a :bwipe followed by :new might get
+ * the same allocated memory.
*/
int
bufref_valid(bufref_T *bufref)
{
return bufref->br_buf_free_count == buf_free_count
! ? TRUE : buf_valid(bufref->br_buf)
! && bufref->br_fnum == bufref->br_buf->b_fnum;
}
/*
***************
*** 2261,2274 ****
}
/*
! * get alternate file n
! * set linenr to lnum or altfpos.lnum if lnum == 0
! * also set cursor column to altfpos.col if 'startofline' is not set.
* if (options & GETF_SETMARK) call setpcmark()
* if (options & GETF_ALT) we are jumping to an alternate file.
* if (options & GETF_SWITCH) respect 'switchbuf' settings when jumping
*
! * return FAIL for failure, OK for success
*/
int
buflist_getfile(
--- 2265,2278 ----
}
/*
! * Get alternate file "n".
! * Set linenr to "lnum" or altfpos.lnum if "lnum" == 0.
! * Also set cursor column to altfpos.col if 'startofline' is not set.
* if (options & GETF_SETMARK) call setpcmark()
* if (options & GETF_ALT) we are jumping to an alternate file.
* if (options & GETF_SWITCH) respect 'switchbuf' settings when jumping
*
! * Return FAIL for failure, OK for success.
*/
int
buflist_getfile(
***************
*** 2999,3005 ****
#if defined(FEAT_LISTCMDS) || defined(PROTO)
/*
! * List all know file names (for :files and :buffers command).
*/
void
buflist_list(exarg_T *eap)
--- 3003,3009 ----
#if defined(FEAT_LISTCMDS) || defined(PROTO)
/*
! * List all known file names (for :files and :buffers command).
*/
void
buflist_list(exarg_T *eap)
--
Lower life forms have more fun!
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
|
v8.0.0607 / 45e5fd1 fixed this. |
Followup to #1728.
Without this, the Neomake test suite would still fail.