Skip to content

Conversation

@pocke
Copy link

@pocke pocke commented Jul 22, 2018

Problem

Sometimes Ruby program outputs warnings to stderr. And it breaks vim drawing when using if_ruby.
For example:

" in vimrc
ruby $stderr.write 'something'

It breaks Vim drawing. And reading the warning is hard. Because the warning will fade out by re-rendering of Vim.

Solution

Redirect stderr to vim message same as stdout.
This change will display warnings as vim's message, so it does not break drawing of Vim. And we can look again warnings by :messages command.

Problem
===

Sometimes Ruby program outputs warnings to stderr. And it breaks vim drawing when using if_ruby.
For example:

```vim
" in vimrc
ruby $stderr.write 'something'
```

It breaks Vim drawing. And reading the warning is hard. Because the warning will fade out by re-rendering of Vim.

Solution
====

Redirect stderr to vim message same as stdout.
This change will display warnings as vim's message, so it does not break drawing of Vim. And we can look again warnings by `:messages` command.
@codecov-io
Copy link

Codecov Report

Merging #3238 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3238      +/-   ##
==========================================
- Coverage   76.44%   76.42%   -0.02%     
==========================================
  Files          93       93              
  Lines      136798   136802       +4     
==========================================
- Hits       104570   104554      -16     
- Misses      32228    32248      +20
Impacted Files Coverage Δ
src/if_ruby.c 58.2% <100%> (+0.32%) ⬆️
src/gui_gtk_x11.c 47.63% <0%> (-0.45%) ⬇️
src/ex_cmds.c 79.81% <0%> (-0.23%) ⬇️
src/channel.c 83.03% <0%> (-0.08%) ⬇️
src/undo.c 83.09% <0%> (-0.07%) ⬇️
src/window.c 81.69% <0%> (-0.04%) ⬇️
src/if_py_both.h 76.57% <0%> (ø) ⬆️
src/if_xcmdsrv.c 84.71% <0%> (+0.17%) ⬆️

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 6183ccb...0e0508f. Read the comment docs.

@brammool brammool closed this in b6c8cd8 Jul 24, 2018
@pocke pocke deleted the if_ruby-stderr branch July 24, 2018 03:50
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