Repository navigation
termios: fix normal cursor shape set by ESC[v - #86
Conversation
|
Are you sure of that? |
|
Answering #86 (comment) ("Just make it to work w/o split"): done in 987cf76. The normal cursor is now The sandbox would not let me force-push a squashed commit, so this is a second commit on top of 27200f7. Squash on merge if you prefer one commit. Generated by Claude Code |
987cf76 to
c87f618
Compare
| top_line = 0; | ||
| else | ||
| top_line = bot_line + 1; | ||
| top_line = 0; |
There was a problem hiding this comment.
I don't understand...
Why vim doesn't set ENHANCED_CURSOR
if it wants a big one?
|
Answering #86 (comment) ("Why vim doesn't set ENHANCED_CURSOR if it wants a big one?"): vim doesn't want a big one. It only asks for the "normal" cursor: it hides it with The full-cell cursor you see on the host is not something vim asks for. It is just the host terminal's default cursor style for "normal" (xterm and most others default to a block). So "normal" means "whatever this terminal considers normal". For a DOS console that has traditionally been an underline, which is the 0x0607-style 13-14 shape from 27200f7. The current c87f618 instead copies the host look and makes normal a block, the same as enhanced. Both avoid start > end. Which one do you want: the underline (DOS-like, normal and enhanced differ), or the block (host-like, normal = enhanced)? Generated by Claude Code |
|
Ok, I guess I want |
|
Answering #86 (comment) ("I want
I can do the dj64dev part in this PR. The comcom32 part I can't push: this session has no write access to dosemu2/comcom32 (the Claude GitHub app is not installed there). Either install the app on comcom32, or I post the comcom32 patch here as a diff for you to apply. OK to go this way? Generated by Claude Code |
I think if vim sends ESC[v (cnorm), |
c87f618 to
29d589d
Compare
|
Answering #86 (comment) ("if vim sends ESC[v (cnorm), then it should be exactly that"): done in 29d589d (squashed, force-pushed). Generated by Claude Code |
| top_line = 0; | ||
| else | ||
| top_line = bot_line + 1; | ||
| top_line = 0; |
There was a problem hiding this comment.
I think this should be returned to -1.
Also maybe we need to use _farpeekw(_dos_ds, 0x460)
in the above change, not __tty_screen.init_cursor_shape
29d589d to
b0d8a0b
Compare
set_cursor_shape() computed the normal cursor as top_line = bot_line + 1, which gives start > end: 15-14 for the 8x16 font and 8-7 for 8x8. VGA does not draw such a cursor at all, and dosemu only showed it via its split cursor emulation. Make ESC[v (cnorm) restore the cursor shape saved at init, the one the console had before. Also correct the computed normal shape to bot_line - 1.
b0d8a0b to
dfcd66d
Compare
|
Answering #86 (comment):
Generated by Claude Code |
| top_line = 0; | ||
| else | ||
| top_line = bot_line + 1; | ||
| top_line = bot_line - 1; |
There was a problem hiding this comment.
Lets CC @jwt27 as this looks like
a genuine djgpp bug.
But given that we ended up needing
also the change above, this point is moot.
Before:
ESC[v(normal cursor,cnormin the djgpp terminfo) sets cursor start > end: 15-14 for the 8x16 font, 8-7 for 8x8. A VGA does not draw such a cursor, sovimunderunix.com/djterm had no cursor, and dosemu2 grew a split-cursor emulation (dosemu2 2c06e1bfb) to show anything.After: the normal cursor is 13-14 for 8x16 and 6-7 for 8x8, the same as the fixed 0x0607 used before 60b9108.
How: in
set_cursor_shape(),top_line = bot_line - 1instead of+ 1. Found while reviewing dosemu2/dosemu2#3134 (a dosemu-D+vlog ofunix vimshowsset text cursor shape: 15-14right after cnorm).