Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
server:mail
alpine
chappa-DelText.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File chappa-DelText.patch of Package alpine
--- pico/basic.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ pico/efunc.h | 1 + pico/search.c | 7 ++++++- 3 files changed, 57 insertions(+), 1 deletion(-) Index: alpine-2.26/pico/basic.c =================================================================== --- alpine-2.26.orig/pico/basic.c +++ alpine-2.26/pico/basic.c @@ -772,7 +772,57 @@ scrolldownline(int f, int n) return (scrollforw (1, FALSE)); } +/* deltext deletes from the specified position until the end of the file + * or until the signature (when called from Pine), whichever comes first. + */ +int +deltext (f,n) +int f,n; +{ + LINE *currline = curwp->w_dotp; + static int firsttime = 0; + + if ((lastflag&CFKILL) == 0) + kdelete(); + + curwp->w_markp = curwp->w_dotp; + curwp->w_marko = curwp->w_doto; + + while (curwp->w_dotp != curbp->b_linep){ + if ((Pmaster) + && (llength(curwp->w_dotp) == 3) + && (lgetc(curwp->w_dotp, 0).c == '-') + && (lgetc(curwp->w_dotp, 1).c == '-') + && (lgetc(curwp->w_dotp, 2).c == ' ')){ + if (curwp->w_dotp == currline){ + if (curwp->w_doto) + curwp->w_dotp = lforw(curwp->w_dotp); + else + break; + } + else{ + curwp->w_dotp = lback(curwp->w_dotp); + curwp->w_doto = llength(curwp->w_dotp); + break; + } + } + else{ + if(lforw(curwp->w_dotp) != curbp->b_linep) + curwp->w_dotp = lforw(curwp->w_dotp); + else{ + curwp->w_doto = llength(curwp->w_dotp); + break; + } + } + } + killregion(FALSE,1); + lastflag |= CFKILL; + if(firsttime == 0) + emlwrite("Deleted text can be recovered with the ^U command", NULL); + firsttime = 1; + return TRUE; +} /* * Scroll to a position. Index: alpine-2.26/pico/efunc.h =================================================================== --- alpine-2.26.orig/pico/efunc.h +++ alpine-2.26/pico/efunc.h @@ -56,6 +56,7 @@ extern int gotobop(int, int); extern int gotoeop(int, int); extern int forwpage(int, int); extern int backpage(int, int); +extern int deltext (int, int); extern int scrollupline(int, int); extern int scrolldownline(int, int); extern int scrollto(int, int); Index: alpine-2.26/pico/search.c =================================================================== --- alpine-2.26.orig/pico/search.c +++ alpine-2.26/pico/search.c @@ -69,6 +69,7 @@ EXTRAKEYS menu_srchpat[] = { {"^O", N_("End of Para"), (CTRL|'O')}, {"^U", N_("FullJustify"), (CTRL|'U')}, {"^P", N_("Delete Para"), (CTRL|'P')}, + {"^X", N_("Del End"), (CTRL|'X')}, {NULL, NULL, 0} }; @@ -282,7 +283,11 @@ forwsearch(int f, int n) break; case (CTRL|'X'): - if(flags & SR_OPTNMEN){ + if (flags & SR_ORIGMEN){ + deltext(f,n); + FWS_RETURN(TRUE); + } + else if(flags & SR_OPTNMEN){ if (flags & SR_NOEXACT){ flags &= ~SR_NOEXACT; flags |= SR_EXACTSR;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor