[vim/vim] runtime(doc): correct '%v' description in 'errorformat'. And runtime(compiler): use '%v' instead of '%c' in gcc 'errorformat' (PR #20352)

2 views
Skip to first unread message

h_east

unread,
3:47 AM (14 hours ago) 3:47 AM
to vim/vim, Subscribed

runtime(doc): correct '%v' description in 'errorformat'

The help said '%v' always counts a as 8 screen columns, but since patch 8.1.0859 the conversion uses the buffer's 'tabstop'. Document this and note that the compiler's tab width (e.g. gcc's -ftabstop) must match 'tabstop' for the column to be correct.


runtime(compiler): use '%v' instead of '%c' in gcc 'errorformat'

gcc reports column numbers with tabs expanded to screen columns (8 by default, controlled by -ftabstop), so '%c' (a byte index) points at the wrong column when a line starts with tabs. Using '%v' makes Vim treat the value as a screen column.

original patch by: @vimpostor

fixed: #20321


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20352

Commit Summary

  • 09f30d9 runtime(doc): correct '%v' description in 'errorformat'

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20352@github.com>

h_east

unread,
7:36 AM (10 hours ago) 7:36 AM
to vim/vim, Subscribed
h-east left a comment (vim/vim#20352)

Closing this. The approach was wrong: documenting the 'tabstop'-dependent
behavior is not a fix. As Bram noted in #3658, %v should always count a tab
as 8 columns.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20352/c4563590019@github.com>

Reply all
Reply to author
Forward
0 new messages