junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.49k stars 115 forks source link

Display width issue #10

Closed vestrobaa closed 10 years ago

vestrobaa commented 10 years ago

One character less than the specified width is displayed. This truncates the last character on a line if you $, and also hides the extends listchar for long lines.

For example: Goyou 30 will display 29 characters only

junegunn commented 10 years ago

Hey, thanks for the report.

Goyo command by default overrides NonText highlighting group so that they're not visible, and as a result, "extends" listchar will not be visible.

The "NonText" highlighting will be used for "eol", "extends" and "precedes"

So what you see here is in fact invisible "extends" listchar placed at the end of each line, making the window look narrower by one character. It will be obvious if you override NonText group again.

hi NonText ctermfg=red guifg=#ff0000

If you don't like this default behavior of hiding NonText group, you can use g:goyo_callbacks to revert the colors.

Do you think Goyo command should temporarily disable "extends" listchar? I'm not sure about this.

vestrobaa commented 10 years ago

Thanks for the quick response. I'd suggest not to change it the extends listchar, keep it simple.

junegunn commented 10 years ago

Okay thanks. I'll close the issue. Let me know if you have any other problem.