Minor updates again...
This commit is contained in:
parent
04836b2618
commit
6cf6a35022
26
xource.c
26
xource.c
@ -46,7 +46,7 @@ int main (int argc, char * * argv) {
|
||||
|
||||
syntax_define_operators (".,:;<=>+*-/%!&~^?|()[]{}", COLOUR_YELLOW, EFFECT_NORMAL);
|
||||
|
||||
syntax_define_words (keywords, sizeof (keywords) / sizeof (keywords [0]), COLOUR_YELLOW, EFFECT_BOLD);
|
||||
syntax_define_words (keywords, (int) (sizeof (keywords) / sizeof (keywords [0])), COLOUR_YELLOW, EFFECT_BOLD);
|
||||
|
||||
syntax_define_default (1, COLOUR_RED, EFFECT_NORMAL, COLOUR_CYAN, EFFECT_BOLD);
|
||||
|
||||
@ -58,12 +58,20 @@ int main (int argc, char * * argv) {
|
||||
curses_render_background (' ', COLOUR_WHITE, EFFECT_NORMAL);
|
||||
|
||||
length = 0;
|
||||
curses_render_string (file_list_name [file_list_active], COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
curses_render_string (file_list_name [file_list_active], COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += string_length (file_list_name [file_list_active]);
|
||||
curses_render_string (" -- ", COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += 4;
|
||||
curses_render_string (" $ ", COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += 3;
|
||||
curses_render_string (number_to_string (file_list_size [file_list_active]), COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += string_length (number_to_string (file_list_size [file_list_active]));
|
||||
curses_render_string (" X ", COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += 3;
|
||||
curses_render_string (number_to_string (cursor_x), COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += string_length (number_to_string (cursor_x));
|
||||
curses_render_string (" Y ", COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += 3;
|
||||
curses_render_string (number_to_string (cursor_y), COLOUR_WHITE, EFFECT_REVERSE, length, 0);
|
||||
length += string_length (number_to_string (cursor_y));
|
||||
|
||||
for (offset = length; offset != curses_screen_width; ++offset) {
|
||||
curses_render_string (" ", COLOUR_WHITE, EFFECT_REVERSE, offset, 0);
|
||||
@ -109,12 +117,12 @@ int main (int argc, char * * argv) {
|
||||
|
||||
curses_synchronize ();
|
||||
|
||||
if (curses_character == ('Q' & CONTROL)) {
|
||||
if (curses_character == (int) ('Q' & CONTROL)) {
|
||||
curses_active = 0;
|
||||
} else if (curses_character == '\r') {
|
||||
} else if (curses_character == (int) '\r') {
|
||||
file_list_insert_character ('\n', cursor);
|
||||
++cursor;
|
||||
} else if (curses_character == ('S' & CONTROL)) {
|
||||
} else if (curses_character == (int) ('S' & CONTROL)) {
|
||||
file_list_export (file_list_name [file_list_active]);
|
||||
} else if (curses_character == BACKSPACE) {
|
||||
file_list_remove_character (cursor);
|
||||
@ -133,8 +141,8 @@ int main (int argc, char * * argv) {
|
||||
++cursor;
|
||||
} else if (curses_character == ARROW_LEFT) {
|
||||
--cursor;
|
||||
} else if (character_is_visible (curses_character)) {
|
||||
file_list_insert_character (curses_character, cursor);
|
||||
} else if (character_is_visible ((char) curses_character) != 0) {
|
||||
file_list_insert_character ((char) curses_character, cursor);
|
||||
++cursor;
|
||||
} else {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user