summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alpine/addrbook.c4
-rw-r--r--alpine/mailindx.c2
-rw-r--r--alpine/mailpart.c4
-rw-r--r--alpine/mailview.c12
-rw-r--r--alpine/osdep/termin.gen.c2
-rw-r--r--pith/conf.c2
-rw-r--r--pith/conftype.h1
-rw-r--r--pith/pine.hlp34
8 files changed, 60 insertions, 1 deletions
diff --git a/alpine/addrbook.c b/alpine/addrbook.c
index 2b13ba0b..2860e885 100644
--- a/alpine/addrbook.c
+++ b/alpine/addrbook.c
@@ -374,11 +374,15 @@ display_book(int start_disp, int cur_line, int old_line, int redraw, Pos *start_
if(cur_line != old_line){
/*--- Repaint old position to erase "cursor" ---*/
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(old_line + HEADER_ROWS(ps_global));
paint_line(old_line + HEADER_ROWS(ps_global), as.top_ent + old_line,
0, &sp);
}
/*--- paint the position with the cursor ---*/
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(cur_line + HEADER_ROWS(ps_global));
paint_line(cur_line + HEADER_ROWS(ps_global), as.top_ent + cur_line,
1, &sp);
if(start_pos)
diff --git a/alpine/mailindx.c b/alpine/mailindx.c
index 6e6feeb1..63f92772 100644
--- a/alpine/mailindx.c
+++ b/alpine/mailindx.c
@@ -1846,6 +1846,8 @@ paint_index_line(ICE_S *argice, int line, long int msgno, IndexColType sfld,
do_arrow = (afld != iNothing);
MoveCursor(HEADER_ROWS(ps_global) + line, 0);
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ CleartoEOLN();
/* find the base color for the whole line */
if(cur && !ac && !do_arrow){
diff --git a/alpine/mailpart.c b/alpine/mailpart.c
index c5947652..3261c63a 100644
--- a/alpine/mailpart.c
+++ b/alpine/mailpart.c
@@ -1006,6 +1006,8 @@ attachment_screen_updater(struct pine *ps, ATDISP_S *current, ATT_SCREEN_S *scre
if(!(!screen->current || ctmp == screen->current || ctmp == current))
continue;
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(dline + HEADER_ROWS(ps));
if(ctmp && ctmp->dstring){
char *p = tmp_20k_buf;
int i, col, x = 0, totlen;
@@ -1061,7 +1063,7 @@ attachment_screen_updater(struct pine *ps, ATDISP_S *current, ATT_SCREEN_S *scre
&& !(F_ON(F_FORCE_LOW_SPEED,ps) || ps->low_speed))
EndInverse();
}
- else
+ else if(F_OFF(F_ENABLE_DEL_WHEN_WRITING, ps_global))
ClearLine(dline + HEADER_ROWS(ps));
}
diff --git a/alpine/mailview.c b/alpine/mailview.c
index dd4c6a38..1265b051 100644
--- a/alpine/mailview.c
+++ b/alpine/mailview.c
@@ -4431,6 +4431,8 @@ scroll_scroll_text(long int new_top_line, HANDLE_S *handle, int redraw)
if(st->parms->text.src == FileStar)
l -= new_top_line;
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(top + lp->where.row);
PutLine0n8b(top + lp->where.row, 0, st->text_lines[l],
st->line_lengths[l], handle);
}
@@ -4448,6 +4450,8 @@ scroll_scroll_text(long int new_top_line, HANDLE_S *handle, int redraw)
if(st->parms->text.src == FileStar)
l -= new_top_line;
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(top + lp->where.row);
PutLine0n8b(top + lp->where.row, 0, st->text_lines[l],
st->line_lengths[l], handle);
}
@@ -4507,6 +4511,8 @@ scroll_scroll_text(long int new_top_line, HANDLE_S *handle, int redraw)
if(st->parms->text.src == FileStar)
l -= new_top_line;
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(top + lp->where.row);
PutLine0n8b(top + lp->where.row, 0, st->text_lines[l],
st->line_lengths[l], handle);
}
@@ -4521,6 +4527,8 @@ scroll_scroll_text(long int new_top_line, HANDLE_S *handle, int redraw)
: st->top_text_line + num_display_lines;
if(l < st->num_lines){
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(st->screen.start_line + num_display_lines - 1);
PutLine0n8b(st->screen.start_line + num_display_lines - 1,
0, st->text_lines[l], st->line_lengths[l],
handle ? handle : st->parms->text.handles);
@@ -4549,6 +4557,8 @@ scroll_scroll_text(long int new_top_line, HANDLE_S *handle, int redraw)
l = (st->parms->text.src == FileStar)
? st->top_text_line - new_top_line
: st->top_text_line;
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(st->screen.start_line);
PutLine0n8b(st->screen.start_line, 0, st->text_lines[l],
st->line_lengths[l],
handle ? handle : st->parms->text.handles);
@@ -4574,6 +4584,8 @@ scroll_scroll_text(long int new_top_line, HANDLE_S *handle, int redraw)
for(lp = handle->loc; lp; lp = lp->next)
if(lp->where.row >= st->top_text_line
&& lp->where.row < st->top_text_line + st->screen.length){
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(st->screen.start_line + (lp->where.row - st->top_text_line));
PutLine0n8b(st->screen.start_line
+ (lp->where.row - st->top_text_line),
0, st->text_lines[lp->where.row],
diff --git a/alpine/osdep/termin.gen.c b/alpine/osdep/termin.gen.c
index 99cdb4ce..b8d01b15 100644
--- a/alpine/osdep/termin.gen.c
+++ b/alpine/osdep/termin.gen.c
@@ -432,6 +432,8 @@ optionally_enter(char *utf8string, int y_base, int x_base, int utf8string_size,
draw_keymenu(km, bitmap, cols, 1-FOOTER_ROWS(ps_global), 0, FirstMenu);
}
+ if(F_ON(F_ENABLE_DEL_WHEN_WRITING, ps_global))
+ ClearLine(real_y_base);
if(pico_usingcolor() && VAR_PROMPT_FORE_COLOR &&
VAR_PROMPT_BACK_COLOR &&
pico_is_good_color(VAR_PROMPT_FORE_COLOR) &&
diff --git a/pith/conf.c b/pith/conf.c
index 44854f48..e8904e45 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -3386,6 +3386,8 @@ feature_list(int index)
F_DISABLE_SHARED_NAMESPACES, h_config_disable_shared, PREF_HIDDEN, 0},
{"disable-signature-edit-cmd", NULL,
F_DISABLE_SIGEDIT_CMD, h_config_disable_signature_edit, PREF_HIDDEN, 0},
+ {"enable-delete-before-writing", NULL,
+ F_ENABLE_DEL_WHEN_WRITING, h_config_delete_before_writing, PREF_HIDDEN, 0},
{"new-thread-on-blank-subject", "New Thread on Blank Subject",
F_NEW_THREAD_ON_BLANK_SUBJECT, h_config_new_thread_blank_subject, PREF_HIDDEN, 1},
{"quell-personal-name-prompt", NULL,
diff --git a/pith/conftype.h b/pith/conftype.h
index 439ed887..c563126e 100644
--- a/pith/conftype.h
+++ b/pith/conftype.h
@@ -374,6 +374,7 @@ typedef enum {
F_DISABLE_UPDATE_CMD,
F_DISABLE_KBLOCK_CMD,
F_DISABLE_SIGEDIT_CMD,
+ F_ENABLE_DEL_WHEN_WRITING,
F_DISABLE_ROLES_SETUP,
F_DISABLE_ROLES_SIGEDIT,
F_DISABLE_ROLES_TEMPLEDIT,
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 2e7326ee..060a897a 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -183,6 +183,16 @@ it for you. Please take some time to read it and understand it.
Since the Privacy Policy could be amended to take into consideration
new additions to Alpine, please check it periodically.
+<P> These changes were added after the release of version <!--#echo var="ALPINE_VERSION"-->.
+
+<P>
+New features include:
+<UL>
+<LI> New hidden feature <a href="h_config_delete_before_writing"><!--#echo var="FEAT_enable-delete-before-writing"--></a>
+to add support for terminals that need lines to be deleted before being written. Based
+on a collaboration with Professor Martin Trusler.
+</UL>
+
<P> The changes in version <!--#echo var="ALPINE_VERSION"--> are as follows:
<P>
@@ -4688,6 +4698,7 @@ There are also additional details on
<li><a href="h_config_disable_collate">FEATURE: <!--#echo var="FEAT_disable-setlocale-collate"--></a>
<li><a href="h_config_disable_shared">FEATURE: <!--#echo var="FEAT_disable-shared-namespaces"--></a>
<li><a href="h_config_disable_signature_edit">FEATURE: <!--#echo var="FEAT_disable-signature-edit-cmd"--></a>
+<li><a href="h_config_delete_before_writing">FEATURE: <!--#echo var="FEAT_enable-delete-before-writing"--></a>
<li><a href="h_config_take_fullname">FEATURE: <!--#echo var="FEAT_disable-take-fullname-in-addresses"--></a>
<li><a href="h_config_take_lastfirst">FEATURE: <!--#echo var="FEAT_disable-take-last-comma-first"--></a>
<li><a href="h_config_disable_reset_disp">FEATURE: <!--#echo var="FEAT_disable-terminal-reset-for-display-filters"--></a>
@@ -34521,6 +34532,29 @@ the Setup/Config screen.
&lt;End of help on this topic&gt;
</BODY>
</HTML>
+====== h_config_delete_before_writing =====
+<HTML>
+<HEAD>
+<TITLE>FEATURE: <!--#echo var="FEAT_enable-delete-before-writing"--></TITLE>
+</HEAD>
+<BODY>
+<H1>FEATURE: <!--#echo var="FEAT_enable-delete-before-writing"--></H1>
+
+This feature controls a behavior of Alpine intended to workaround problems in
+terminals where the marker for the end of inverse video cannot be overwritten,
+but must be deleted, as a way to start inverse video again.
+
+<P>
+When this feature is enabled, Alpine will delete a line before writing it,
+therefore deleting the end of reverse video. Modern terminals do not require
+to enable this feature, but some old terminals might require it.
+<P>
+<UL>
+<LI><A HREF="h_finding_help">Finding more information and requesting help</A>
+</UL><P>
+&lt;End of help on this topic&gt;
+</BODY>
+</HTML>
====== h_config_disable_roles_templateedit =====
<HTML>
<HEAD>