ref: cf6789dc703ba88c7fa125d0895f75ec0f6baf80
parent: e34c9f027a536d1cdb216ab88f4b4a16789a16e8
author: cancel <cancel@cancel.fm>
date: Mon Dec 3 04:42:16 EST 2018
Remove specialized '+' cursor behavior
--- a/tui_main.c
+++ b/tui_main.c
@@ -164,21 +164,12 @@
void draw_tui_cursor(WINDOW* win, Glyph const* gbuffer, Usz field_h,
Usz field_w, Usz ruler_spacing_y, Usz ruler_spacing_x,
Usz cursor_y, Usz cursor_x) {
+ (void)ruler_spacing_y;
+ (void)ruler_spacing_x;
if (cursor_y >= field_h || cursor_x >= field_w)
return;
Glyph beneath = gbuffer[cursor_y * field_w + cursor_x];
- char displayed;
- if (beneath == '.') {
- if (ruler_spacing_y != 0 && ruler_spacing_x != 0 &&
- (cursor_y % ruler_spacing_y) == 0 &&
- (cursor_x % ruler_spacing_x) == 0) {
- displayed = '+';
- } else {
- displayed = '@';
- }
- } else {
- displayed = beneath;
- }
+ 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);