summaryrefslogtreecommitdiffstats
path: root/contrib/less/prompt.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2011-05-09 21:51:59 +0000
committerdelphij <delphij@FreeBSD.org>2011-05-09 21:51:59 +0000
commit142a49a4be37258477d8ce2b19011a75c36bd418 (patch)
treee6e6402d1f7ea7e3382a94b4f654586f41b93f2c /contrib/less/prompt.c
parent39f7e10a268694e139c11157f966ca179b834212 (diff)
downloadFreeBSD-src-142a49a4be37258477d8ce2b19011a75c36bd418.zip
FreeBSD-src-142a49a4be37258477d8ce2b19011a75c36bd418.tar.gz
MFV: Update to less v443.
MFC after: 1 month
Diffstat (limited to 'contrib/less/prompt.c')
-rw-r--r--contrib/less/prompt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/less/prompt.c b/contrib/less/prompt.c
index 636624d..daad00d 100644
--- a/contrib/less/prompt.c
+++ b/contrib/less/prompt.c
@@ -1,6 +1,6 @@
/* $FreeBSD$ */
/*
- * Copyright (C) 1984-2009 Mark Nudelman
+ * Copyright (C) 1984-2011 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -304,6 +304,9 @@ protochar(c, where, iseditproto)
case 'f': /* File name */
ap_str(get_filename(curr_ifile));
break;
+ case 'F': /* Last component of file name */
+ ap_str(last_component(get_filename(curr_ifile)));
+ break;
case 'i': /* Index into list of files */
#if TAGS
if (ntags())
@@ -364,6 +367,7 @@ protochar(c, where, iseditproto)
case 't': /* Truncate trailing spaces in the message */
while (mp > message && mp[-1] == ' ')
mp--;
+ *mp = '\0';
break;
case 'T': /* Type of list */
#if TAGS
OpenPOWER on IntegriCloud