Changes in uspace/app/edit/edit.c [cd82bb1:36e9cd1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/edit.c
rcd82bb1 r36e9cd1 98 98 static bool done; 99 99 static pane_t pane; 100 static bool cursor_visible; 100 101 101 102 static int scr_rows, scr_columns; … … 108 109 /** Maximum filename length that can be entered. */ 109 110 #define INFNAME_MAX_LEN 128 111 112 static void cursor_show(void); 113 static void cursor_hide(void); 114 static void cursor_setvis(bool visible); 110 115 111 116 static void key_handle_unmod(console_event_t const *ev); … … 199 204 200 205 /* Initial display */ 206 cursor_visible = true; 207 208 cursor_hide(); 201 209 console_clear(con); 202 210 pane_text_display(); … … 205 213 status_display("File not found. Starting empty file."); 206 214 pane_caret_display(); 207 215 cursor_show(); 208 216 209 217 done = false; … … 230 238 /* Redraw as necessary. */ 231 239 240 cursor_hide(); 241 232 242 if (pane.rflags & REDRAW_TEXT) 233 243 pane_text_display(); … … 238 248 if (pane.rflags & REDRAW_CARET) 239 249 pane_caret_display(); 250 251 cursor_show(); 240 252 } 241 253 … … 243 255 244 256 return 0; 257 } 258 259 static void cursor_show(void) 260 { 261 cursor_setvis(true); 262 } 263 264 static void cursor_hide(void) 265 { 266 cursor_setvis(false); 267 } 268 269 static void cursor_setvis(bool visible) 270 { 271 if (cursor_visible != visible) { 272 console_cursor_visibility(con, visible); 273 cursor_visible = visible; 274 } 245 275 } 246 276 … … 688 718 wchar_t c; 689 719 size_t pos, size; 690 unsigneds_column;720 int s_column; 691 721 coord_t csel_start, csel_end, ctmp; 692 722 … … 736 766 s_column = pane.sh_column; 737 767 while (pos < size) { 738 if ( csel_start.row == rbc.row && csel_start.column == s_column) {768 if ((csel_start.row == rbc.row) && (csel_start.column == s_column)) { 739 769 fflush(stdout); 740 770 console_set_color(con, COLOR_BLACK, COLOR_RED, 0); … … 742 772 } 743 773 744 if ( csel_end.row == rbc.row && csel_end.column == s_column) {774 if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) { 745 775 fflush(stdout); 746 776 console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0); … … 762 792 } 763 793 764 if ( csel_end.row == rbc.row && csel_end.column == s_column) {794 if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) { 765 795 fflush(stdout); 766 796 console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0);
Note:
See TracChangeset
for help on using the changeset viewer.