ref: 22c9cc85c773471cf13a86a8cff9eab8efab1de6
parent: 8c0c3272a2ac0012e11414641d217014f23ee6bc
author: cancel <cancel@cancel.fm>
date: Sun Dec 2 12:18:19 EST 2018
Add showing of glyph underneath cursor
--- a/tui_main.c
+++ b/tui_main.c
@@ -168,7 +168,9 @@
(void)ruler_x;
if (cursor_y >= field_h || cursor_x >= field_w)
return;
- chtype ch = (chtype)('@' | (A_reverse | A_bold | fg_bg(C_yellow, C_natural)));
+ Glyph beneath = gbuffer[cursor_y * field_w + cursor_x];
+ char displayed = beneath == '.' ? '@' : beneath;
+ chtype ch = (chtype)(displayed | (A_reverse | A_bold | fg_bg(C_yellow, C_natural)));
wmove(win, (int)cursor_y, (int)cursor_x);
waddchnstr(win, &ch, 1);
}