Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Pre-5.0.5 part 3: Heuristic for ZLE_RPROMPT_INDENT



On Feb 7, 10:45am, Oliver Kiddle wrote:
}
} On 2 Feb, Bart wrote:
} > Another one we agreed to leave for after a stable release.  This takes a
} > best guess at whether the terminal can handle having a character written
} > to the lower right corner
} 
} This is resulting in my cursor appearing one column more to the left
} than it should.

This is one of the expected bad behaviors which is the reason we left
out the hueristic.

} Actually, ZLE_RPROMPT_INDENT=0 with 5.0.5 is enough for that to occur.

That would be expected; the heuristic doesn't do anything other than
set an initial value for ZLE_RPROMPT_INDENT.

} This effect seems to occur only on some terminals but may be version
} specific because I get different results for the same terminal on
} different systems.

More likely it's termcap/terminfo database version specific.  Can you
compare the terminfo settings for two cases of the same terminal giving
different behavior and report the difference?

If it's not terminfo, it may be some kind of emulation option that has
a different setting in the Xdefaults etc.

} None of the terminals I have are attempting to scroll when writing to
} the bottom right corner. The ones that work are ignoring a subsequent
} backward cursor movement - as if the cursor had really moved beyond the
} edge of terminal.

This is exactly the thing that terminfo reports unreliably, which is why
the default for years has been to keep the right prompt indented one
space from the right margin.  I was hoping the newer sam/YE terminfo/cap
value would provide the right clue, and be widespread enough now to be
reliable.

If we can't improve the heuristic we should just remove it again.

} Is it perhaps possible to fix this by changing from a relative to an
} absolute cursor movement after the RPROMPT is displayed?

Unfortunately, no; once completion listings and other stuff that is
displayed below the prompt become involved, ZLE no longer knows what
its absolute cursor position ought to be.  It would need a really big
rewrite to do real full-screen management for absolute positioning to
work.



Messages sorted by: Reverse Date, Date, Thread, Author