summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-04-17 13:52:27 -0600
committerEduardo Chappa <chappa@washington.edu>2021-04-17 13:52:27 -0600
commit9190d6a72e2464faa39fdb6a792cff01869fd94e (patch)
treef2d138f9cebbccbb6057054e51ecc4f0b8e390fb
parent2f6c9dc8e95cadb1abc2a0f5853aea378ef1b13a (diff)
downloadalpine-9190d6a72e2464faa39fdb6a792cff01869fd94e.tar.xz
* Fix for titlebar for terminals that need the rmso code erased before
a new smso character can be added. The fix is to move the cursor to the last character of the first line before printing the rmso character. Joint collaboration with professor Martin Trusler.
-rw-r--r--alpine/titlebar.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/alpine/titlebar.c b/alpine/titlebar.c
index 0a4fc4d..c7b76f5 100644
--- a/alpine/titlebar.c
+++ b/alpine/titlebar.c
@@ -363,6 +363,9 @@ output_titlebar(TITLE_S *tc)
if(tc && tc->titlebar_line)
PutLine0(0, 0, tc->titlebar_line);
+ if (ps_global->ttyo)
+ MoveCursor(0, ps_global->ttyo->screen_cols); /* move to the last column */
+
if(lastc){
(void)pico_set_colorp(lastc, PSC_NONE);
free_color_pair(&lastc);
@@ -964,6 +967,9 @@ update_titlebar_message(void)
PutLine0(0, as.cur_mess_col, buf);
+ if (ps_global->ttyo)
+ MoveCursor(0, ps_global->ttyo->screen_cols); /* move to the last column */
+
if(lastc){
(void)pico_set_colorp(lastc, PSC_NONE);
free_color_pair(&lastc);
@@ -1038,6 +1044,9 @@ update_titlebar_status(void)
PutLine0(0, as.del_column, BAR_STATUS(as.msg_state));
+ if (ps_global->ttyo)
+ MoveCursor(0, ps_global->ttyo->screen_cols); /* move to the last column */
+
if(lastc){
(void)pico_set_colorp(lastc, PSC_NONE);
free_color_pair(&lastc);
@@ -1077,6 +1086,9 @@ update_titlebar_percent(long int new_line_number)
PutLine0(0, as.percent_column,
percentage(as.current_line, as.total_lines, 0));
+ if (ps_global->ttyo)
+ MoveCursor(0, ps_global->ttyo->screen_cols); /* move to the last column */
+
if(lastc){
(void)pico_set_colorp(lastc, PSC_NONE);
free_color_pair(&lastc);
@@ -1122,6 +1134,9 @@ update_titlebar_lpercent(long int new_line_number)
PutLine0(0, as.percent_column,
percentage(as.current_line, as.total_lines, 0));
+ if (ps_global->ttyo)
+ MoveCursor(0, ps_global->ttyo->screen_cols); /* move to the last column */
+
if(lastc){
(void)pico_set_colorp(lastc, PSC_NONE);
free_color_pair(&lastc);
@@ -1206,6 +1221,10 @@ check_cue_display(char *putstr)
lastc = pico_set_colorp(titlecolor, PSC_REV|PSC_RET);
PutLine0(0, 0, putstr); /* show delay cue */
+
+ if (ps_global->ttyo)
+ MoveCursor(0, ps_global->ttyo->screen_cols); /* move to the last column */
+
if(lastc){
(void)pico_set_colorp(lastc, PSC_NONE);
free_color_pair(&lastc);