Thursday, December 12, 2013

Re: weird bug with relativenumber

diff --git a/src/misc2.c b/src/misc2.c
index b8655e8..6506203 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -487,7 +487,7 @@ get_cursor_rel_lnum(wp, lnum)
{
while (lnum > cursor)
{
- (void)hasFolding(lnum, &lnum, NULL);
+ (void)hasFoldingWin(wp, lnum, &lnum, NULL, TRUE, NULL);
/* if lnum and cursor are in the same fold,
* now lnum <= cursor */
if (lnum > cursor)
@@ -499,7 +499,7 @@ get_cursor_rel_lnum(wp, lnum)
{
while (lnum < cursor)
{
- (void)hasFolding(lnum, NULL, &lnum);
+ (void)hasFoldingWin(wp, lnum, NULL, &lnum, TRUE, NULL);
/* if lnum and cursor are in the same fold,
* now lnum >= cursor */
if (lnum < cursor)
On Wednesday, December 11, 2013 9:49:53 PM UTC+1, Matteo Cavalleri wrote:
> hi, thanks for the answers!
>
> given the fact that, however annoying, this bug is basically cosmetical, i haven't devoted too much time trying to investigate it. that's why after some tentatives to debug it i posted here, usually you guys know the right command to find what happens ;)
>
> i'll try the redraw and I'll try to find some snippet of code where the bug happens always. btw I've just discovered that the piece of code i showed you was able to make the bug always happen on my linux machine at work, but it doesn't happen on my macbook... i wonder if screen size or maybe terminal emulator makes the difference somehow.
>
> i'll update you when i have some news, thanks!

Try the attached patch. Works for me when I compare 2 files with 'rnu' set in each buffer.

Cheers,
LL

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: