Skip to content

Commit

Permalink
defaults: shortmess+=F (neovim#8619)
Browse files Browse the repository at this point in the history
Because we default to laststatus=2 (statusline is always visible), the
:edit message is not useful.

ref neovim#6289
  • Loading branch information
justinmk committed Jun 22, 2018
1 parent cf659a1 commit b751449
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion runtime/doc/options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5293,7 +5293,7 @@ A jump table for the options with a short description can be found at |Q_op|.
function to get the effective shiftwidth value.

*'shortmess'* *'shm'*
'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "")
'shortmess' 'shm' string (Vim default "filnxtToOF", Vi default: "")
global
This option helps to avoid all the |hit-enter| prompts caused by file
messages, for example with CTRL-G, and to avoid some other messages.
Expand Down
1 change: 1 addition & 0 deletions runtime/doc/vim_diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ a complete and centralized reference of those differences.
- 'nrformats' defaults to "bin,hex"
- 'ruler' is set by default
- 'sessionoptions' doesn't include "options"
- 'shortmess' sets "F" flag
- 'showcmd' is set by default
- 'sidescroll' defaults to 1
- 'smarttab' is set by default
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,7 @@ return {
type='string', list='flags', scope={'global'},
vim=true,
varname='p_shm',
defaults={if_true={vi="", vim="filnxtToO"}}
defaults={if_true={vi="", vim="filnxtToOF"}}
},
{
full_name='showbreak', abbreviation='sbr',
Expand Down
3 changes: 2 additions & 1 deletion test/functional/ex_cmds/drop_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local helpers = require('test.functional.helpers')(after_each)
local command = helpers.command
local Screen = require('test.functional.ui.screen')
local clear, feed, feed_command = helpers.clear, helpers.feed, helpers.feed_command

Expand All @@ -15,7 +16,7 @@ describe(":drop", function()
[2] = {reverse = true},
[3] = {bold = true},
})
feed_command("set laststatus=2")
command("set laststatus=2 shortmess-=F")
end)

after_each(function()
Expand Down
2 changes: 2 additions & 0 deletions test/functional/legacy/108_backtrace_debug_commands_spec.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
-- Tests for backtrace debug commands.

local helpers = require('test.functional.helpers')(after_each)
local command = helpers.command
local feed, clear = helpers.feed, helpers.clear
local feed_command, expect = helpers.feed_command, helpers.expect

describe('108', function()
before_each(clear)

it('is working', function()
command("set shortmess-=F")
feed_command('lang mess C')
feed_command('function! Foo()')
feed_command(' let var1 = 1')
Expand Down
2 changes: 2 additions & 0 deletions test/functional/options/shortmess_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local command = helpers.command
local clear, feed_command = helpers.clear, helpers.feed_command

if helpers.pending_win32(pending) then return end
Expand All @@ -19,6 +20,7 @@ describe("'shortmess'", function()

describe('"F" flag', function()
it('hides messages about the files read', function()
command("set shortmess-=F")
feed_command('e test')
screen:expect([[
^ |
Expand Down
2 changes: 1 addition & 1 deletion test/functional/ui/input_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('input non-printable chars', function()
[3] = {bold = true, foreground = Screen.colors.SeaGreen4}
})
screen:attach()
command("set display-=msgsep")
command("set display-=msgsep shortmess-=F")

feed_command("e Xtest-overwrite")
screen:expect([[
Expand Down

0 comments on commit b751449

Please sign in to comment.