Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jamessan
Copy link
Contributor

@jamessan jamessan commented Apr 7, 2017

Currently, opening a cmdwin creates the buffer and then sets a few
options on that buffer, including 'noswapfile'. That leaves a gap where
a swap file gets created, potentially showing a useless error to the user.

Since there's now the :noswapfile command modifier, let's check that to
set the buffer-local value of 'swapfile' when creating a new buffer.
That allows us to then set cmdmod.noswapfile when creating the buffer
for a cmdwin, to prevent the swapfile from ever being created.

@codecov-io
Copy link

codecov-io commented Apr 7, 2017

Codecov Report

Merging #1620 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1620      +/-   ##
==========================================
+ Coverage   74.68%   74.68%   +<.01%     
==========================================
  Files          76       76              
  Lines      124849   124888      +39     
==========================================
+ Hits        93241    93274      +33     
- Misses      31608    31614       +6
Impacted Files Coverage Δ
src/option.c 84.04% <100%> (ø) ⬆️
src/ex_getln.c 72.17% <100%> (ø) ⬆️
src/gui_beval.c 43.82% <0%> (-0.93%) ⬇️
src/gui_gtk_x11.c 47.2% <0%> (-0.16%) ⬇️
src/os_unix.c 58.33% <0%> (-0.15%) ⬇️
src/channel.c 83.65% <0%> (-0.1%) ⬇️
src/message.c 68.44% <0%> (-0.06%) ⬇️
src/window.c 81.08% <0%> (+0.03%) ⬆️
src/memline.c 72.61% <0%> (+0.04%) ⬆️
src/if_py_both.h 76.02% <0%> (+0.45%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba6ec18...639a4c2. Read the comment docs.

This avoids a spurious E303 message if 'directory' happens to not
contain any writable paths when a cmdwin is opened.
@jamessan jamessan force-pushed the cmdwin-noswapfile branch from 23cd6cb to 639a4c2 Compare April 7, 2017 10:51
@brammool brammool closed this in 3bab939 Apr 7, 2017
desvp pushed a commit to desvp/vim that referenced this pull request May 30, 2017
Problem:    Swap file exists briefly when opening the command window.
Solution:   Set the noswapfile command modifier before splitting the window.
            (James McCoy, closes vim#1620)
@jamessan jamessan deleted the cmdwin-noswapfile branch August 13, 2017 23:55
janlazo added a commit to janlazo/neovim that referenced this pull request Jun 18, 2018
… window

Problem:    Swap file exists briefly when opening the command window.
Solution:   Set the noswapfile command modifier before splitting the window.
            (James McCoy, closes vim/vim#1620)
vim/vim@3bab939
janlazo added a commit to janlazo/neovim that referenced this pull request Jun 19, 2018
… window

Problem:    Swap file exists briefly when opening the command window.
Solution:   Set the noswapfile command modifier before splitting the window.
            (James McCoy, closes vim/vim#1620)
vim/vim@3bab939
justinmk pushed a commit to neovim/neovim that referenced this pull request Jun 19, 2018
… window (#8588)

Problem:    Swap file exists briefly when opening the command window.
Solution:   Set the noswapfile command modifier before splitting the window.
            (James McCoy, closes vim/vim#1620)
vim/vim@3bab939
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.

2 participants