Commit Graph

13 Commits

Author SHA1 Message Date
zeertzjq
158ffd646d
vim-patch:9.1.0554: :bw leaves jumplist and tagstack data around (#29639)
Problem:  :bw leaves jumplist and tagstack data around
          (Paul "Joey" Clark)
Solution: Wipe jumplist and tagstack references to the wiped buffer
          (LemonBoy)

As documented the :bwipeout command brutally deletes all the references
to the buffer, so let's make it delete all the entries in the jump list
and tag stack referring to the wiped-out buffer.

fixes: vim/vim#8201
closes: vim/vim#15185

4ff3a9b1e3

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-10 10:35:12 +08:00
zeertzjq
3305bb9e41
vim-patch:9.1.0364: tests: test_vim9_builtin is a bit slow (#28466)
Problem:  tests: test_vim9_builtin is a bit slow
Solution: source tests from a buffer instead of
          writing and sourcing a file (Yegappan Lakshmanan)

closes: vim/vim#14614

22697b6179

N/A patch:
vim-patch:9.1.0299: Vim9: return type not set for a lambda assigned to script var

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-23 08:28:51 +08:00
zeertzjq
35e38833c5
vim-patch:9.1.0363: tests: test_winfixbuf is a bit slow (#28446)
Problem:  tests: test_winfixbuf is a bit slow
Solution: use defer if possible, reset hidden option, use --not-a-term
          when starting Vim using system() (Yegappan Lakshmanan)

closes: vim/vim#14611

4baf908d60

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-22 06:24:22 +08:00
zeertzjq
070b0b4572
vim-patch:9.1.0213: CI: MS-Windows fails in test_winfixbuf (#28071)
Problem:  CI: MS-Windows fails in test_winfixbuf
          (after v9.1.208)
Solution: Instead of skipping the test, write the file
          so it exists on disk, to verify that MS-Windows
          short filename expansion is successful.
          (Sean Dewar)

related: vim/vim#14286

aed6554b46

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2024-03-28 17:53:15 +08:00
zeertzjq
67596c42eb
vim-patch:9.1.0216: Error on exit with EXITFREE and 'winfixbuf' (#28070)
Problem:  Error on exit with EXITFREE and 'winfixbuf'.
Solution: Handle DT_FREE before checking for 'winfixbuf'.
          (zeertzjq)

closes: vim/vim#14314

620e85265c
2024-03-28 17:52:06 +08:00
zeertzjq
8774dad176
vim-patch:9.1.0212: CI: MS-Windows fails in test_winfixbuf (#28056)
Problem:  CI: MS-Windows fails in test_winfixbuf
          (after v9.1.208)
Solution: Skip Ms-Windows for now, fix style

related: vim/vim#14286

79b2867ce3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-03-27 18:46:23 +08:00
Colin Kennedy
61e25b7200
vim-patch:9.1.0208: winfixbuf does not allow to re-edit current buffer (#28054)
Problem:  winfixbuf does not allow to re-edit current buffer
          (Tim Pope, after v9.1.0147)
Solution: Explicitly allow :e even when 'winfixbuf' is set,
          since it just re-loads the current buffer
          (Colin Kennedy)

fixes: vim/vim#14237
closes: vim/vim#14286

65e580bd56
2024-03-27 16:22:33 +08:00
zeertzjq
b17be231a6
vim-patch:9.1.0178: E1513 might be confusing (#27846)
Problem:  E1513 might be confusing
          (Christoph Thoma)
Solution: reword error message, fix test to not
          depend on the actual message

fixes: vim/vim#14189

0a32b8854b

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-03-14 06:44:50 +08:00
zeertzjq
3b3511c4d9 vim-patch:9.1.0156: Make 'wfb' failing to split still report E1513
Problem:  may not be clear why failing to split causes an ":Xdo" command
          to abort if 'wfb' is set.
Solution: do not return immediately if win_split fails, so E1513 is
          still given. Expect both errors in the test. Also fix tests to
          pass CI.
          (Sean Dewar)

closes: vim/vim#14152

769eb2d0c3

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2024-03-11 11:42:03 +08:00
zeertzjq
d71791a11a vim-patch:9.1.0152: Coverity complains about ignoring return value
Problem:  Coverity complains about ignoring return value of win_split()
          (after v9.1.150)
Solution: Check if win_split() failed, add winfixbuf.res to Makefile

af7ae81600

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-03-11 11:38:15 +08:00
Colin Kennedy
5931f2bc4a vim-patch:9.1.0150: Several minor 'winfixbuf' issues
Problem:  several minor 'winfixbuf' issues exist, mostly relating to the
          quickfix list
Solution: address them and adjust tests. Retab and reflow a few things too.
          (Sean Dewar)

Things touched include:

- Replace the semsgs with gettext'd emsgs.

- Handle window switching in ex_listdo properly, so curbuf and curwin
  are kept in-sync and trigger autocommands; handle those properly.

- Don't change the list entry index in qf_jump_edit_buffer if we fail
  due to 'wfb' (achieved by returning FAIL; QF_ABORT should only be used
  if the list was changed).

- Make qf_jump_edit_buffer actually switch to prevwin when using `:cXX`
  commands **outside** of the list window if 'wfb' is set in curwin.
  Handle autocommands properly in case they mess with the list.

  NOTE: previously, it seemed to split if 'wfb' was set, but do nothing
  and fail if prevwin is *valid*. This behaviour seemed strange, and maybe
  unintentional? Now it aligns more with what's described for the `:cXX`
  commands in the original PR description when used outside a list window,
  I think.

- In both functions, only consider prevwin if 'wfb' isn't set for it;
  fallback to splitting otherwise.

- Use win_split to split. Not sure if there was a specific reason for
  using ex_splitview. win_split is simpler and respects modifiers like
  :vertical that may have been used. Plus, its return value can be checked
  for setting opened_window in qf code (technically win_split_ins autocmds
  could immediately close it or change windows, in which the qf code might
  close some other window on failure; it's already the case elsewhere,
  though).

closes: vim/vim#14142

4bb505e28c

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2024-03-11 11:38:15 +08:00
Colin Kennedy
e8bc23db62 vim-patch:9.1.0149: null pointer member access when accessing 'winfixbuf' property
Problem:  qf_goto_win_with_qfl_file may check if prevwin has 'winfixbuf'
          set without checking if it's valid first.
Solution: Reverse the condition. Add a test, a modeline, and a missing
          CheckFeature. (Searn Dewar)

closes: vim/vim#14140

5131f224da

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2024-03-11 11:38:15 +08:00
Colin Kennedy
141182d6c6 vim-patch:9.1.0147: Cannot keep a buffer focused in a window
Problem:  Cannot keep a buffer focused in a window
          (Amit Levy)
Solution: Add the 'winfixbuf' window-local option
          (Colin Kennedy)

fixes:  vim/vim#6445
closes: vim/vim#13903

2157035637

N/A patch:
vim-patch:58f1e5c0893a
2024-03-11 11:38:13 +08:00