vim --clean
:terminal
dir
<c-w>N:echo line('w$')<cr>
The :echo command from the above example should display a number greater than 1.
The same issue happens with line('w0') if the terminal buffer number of lines is larger than the terminal window height.
However, line('$') return the correct number.
9.2 1-45
Windows 11
gvim
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
In my environment, the value is always greater than 1.
(Windows 11 Home, gVim 9.2.51 (64bit). Installed from https://github.com/vim/vim-win32-installer/releases)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I erroneously closed the issue.
I corrected the example to reproduce.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
As I understand it, these values are updated only when the tty size of the terminal changes
For example, if we do this (after reproducing what the author says):
<c-w>:new<cr><c-w>j<c-w>:echo line('w$')<cr>
And now an up to date value will be displayed
If we create even more lines, then we need to somehow resize the window again
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
fixed as of ffeb233
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()