summaryrefslogtreecommitdiffstats
path: root/usr.bin/ee
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-06-03 12:42:19 +0000
committersobomax <sobomax@FreeBSD.org>2001-06-03 12:42:19 +0000
commit20a33c88c5562083b0c4a9076d18993fe887d0e8 (patch)
treeb541816ed9e0cdb8448f70d3babfb7af1a13899a /usr.bin/ee
parentfd81208991819c5d3de2fc0a79345fc30c8ebfd1 (diff)
downloadFreeBSD-src-20a33c88c5562083b0c4a9076d18993fe887d0e8.zip
FreeBSD-src-20a33c88c5562083b0c4a9076d18993fe887d0e8.tar.gz
- Optimise current cursor position displaying routines, to avoid unnecessary
cursor movements; - minor cleanups in cursor position displaying routines; - properly resent "file modified" flag when editing several files. MFC after: 1 week
Diffstat (limited to 'usr.bin/ee')
-rw-r--r--usr.bin/ee/ee.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c
index 6ef653b..3c624a2 100644
--- a/usr.bin/ee/ee.c
+++ b/usr.bin/ee/ee.c
@@ -204,9 +204,9 @@ unsigned char *d_line; /* deleted line */
char in_string[513]; /* buffer for reading a file */
unsigned char *print_command = "lpr"; /* string to use for the print command */
unsigned char *start_at_line = NULL; /* move to this line at start of session*/
-char *count_text; /* buffer for current position display */
-const char *count_text_default = "===============================================================================";
-int count_text_len; /* length of the line above */
+const char count_text_default[] = "===============================================================================";
+int count_text_len = sizeof(count_text_default); /* length of the line above */
+char count_text[sizeof(count_text_default)]; /* buffer for current position display */
int in; /* input character */
FILE *temp_fp; /* temporary file pointer */
@@ -563,8 +563,6 @@ char *argv[];
signal(SIGSEGV, SIG_DFL);
signal(SIGINT, edit_abort);
- count_text_len = strlen(count_text_default) + 1;
- count_text = malloc(count_text_len);
d_char = malloc(3); /* provide a buffer for multi-byte chars */
d_word = malloc(150);
*d_word = (char) NULL;
@@ -621,15 +619,15 @@ char *argv[];
snprintf(count_text, count_text_len, "L: %d C: %d %s", \
curr_line->line_number, scr_horz + 1, count_text_default);
wmove(count_win, 0, 0);
- wclrtoeol(count_win);
if (!nohighlight)
wstandout(count_win);
wprintw(count_win, count_text);
wstandend(count_win);
- wrefresh(count_win);
+ wnoutrefresh(count_win);
}
- wrefresh(text_win);
+ wnoutrefresh(text_win);
+ doupdate();
in = wgetch(text_win);
if (in == -1)
exit(0);
@@ -2436,6 +2434,7 @@ int noverify;
recv_file = TRUE;
input_file = TRUE;
check_fp();
+ text_changes = FALSE;
}
return(0);
}
@@ -3257,8 +3256,7 @@ set_up_term() /* set up the terminal for operating with ae */
werase(info_win);
paint_info_win();
count_win = newwin(1, COLS, 5, 0);
- keypad(count_win, TRUE);
- idlok(count_win, TRUE);
+ leaveok(count_win, TRUE);
wrefresh(count_win);
}
OpenPOWER on IntegriCloud