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

Skip to content

Conversation

@haya14busa
Copy link
Contributor

This problem is similar as #729

Problem

'tabline' is disable with builtin error which is cathced correctly

How To Reproduce

tabline_test.vimrc

function! TablineKiller() abort
  try
    call eval('error!')
  catch
    return 'OK: error catched!'
  endtry
  return 'OK'
endfunction

set showtabline=2
set tabline=%{TablineKiller()}
redraw!
  1. vim -Nu tabline_test.vimrc
    • tabline shows [No Name]

Expect

tabline shows Ok: error catched!

@haya14busa haya14busa changed the title Add test for try/catch in 'tabline' 'tabline' is disable with builtin error which is caught correctly Apr 10, 2016
@haya14busa
Copy link
Contributor Author

to: vim-dev mailing list
I'm sorry I unexpectedly pushed the PR button before writing the correct title and comment.
I edited title and comment but you cannot see the edited content from vim-dev mailing list, so I repeat the comment.

This problem is similar as #729

Problem

'tabline' is disable with builtin error which is cathced correctly

How To Reproduce

tabline_test.vimrc

function! TablineKiller() abort
  try
    call eval('error!')
  catch
    return 'OK: error catched!'
  endtry
  return 'OK'
endfunction

set showtabline=2
set tabline=%{TablineKiller()}
redraw!
  1. vim -Nu tabline_test.vimrc
    • tabline shows [No Name]

Expect

tabline shows Ok: error catched!
m vim-dev mailing list, so I repeat the comment as below.

This problem is similar as #729

ProblemThis problem is similar as #729

Problem

'tabline' is disable with builtin error which is cathced correctly

How To Reproduce

tabline_test.vimrc

function! TablineKiller() abort
  try
    call eval('error!')
  catch
    return 'OK: error catched!'
  endtry
  return 'OK'
endfunction

set showtabline=2
set tabline=%{TablineKiller()}
redraw!
  1. vim -Nu tabline_test.vimrc
    • tabline shows [No Name]

Expect

tabline shows Ok: error catched!

'tabline' is disable with builtin error which is cathced correctly

How To Reproduce

tabline_test.vimrc

function! TablineKiller() abort
  try
    call eval('error!')
  catch
    return 'OK: error catched!'
  endtry
  return 'OK'
endfunction

set showtabline=2
set tabline=%{TablineKiller()}
redraw!
  1. vim -Nu tabline_test.vimrc
    • tabline shows [No Name]

Expect

tabline shows Ok: error catched!

@brammool brammool closed this in f73d3bc Apr 11, 2016
micbou added a commit to micbou/vim that referenced this pull request Apr 11, 2016
- 7.4.1722: Crash when calling garbagecollect() after starting a job.
  Set the copyID on job and channel. (Hirohito Higashi, Ozaki Kiichi)
- 7.4.1723: When using try/catch in 'tabline' it is still considered an
  error and the tabline will be disabled. Check did_emsg instead of
  called_emsg. (haya14busa, closes vim#746)
- 7.4.1724: Tabline test fails in GUI. Remove 'e' from 'guioptions'.
@haya14busa
Copy link
Contributor Author

Thank you for the merge and fix!
There are still several options and functions which seems to have a similar problem(error handling in try/catch ), so I'll send patches and tests later.

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.

1 participant