Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Oct 2017 11:54:15 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r324266 - stable/11/sys/ddb
Message-ID:  <201710041154.v94BsFhk011913@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Wed Oct  4 11:54:15 2017
New Revision: 324266
URL: https://svnweb.freebsd.org/changeset/base/324266

Log:
  MFC r320740:
  
  Make ^w work in ddb(4).

Modified:
  stable/11/sys/ddb/db_input.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ddb/db_input.c
==============================================================================
--- stable/11/sys/ddb/db_input.c	Wed Oct  4 11:53:05 2017	(r324265)
+++ stable/11/sys/ddb/db_input.c	Wed Oct  4 11:54:15 2017	(r324266)
@@ -218,6 +218,19 @@ db_inputchar(c)
 		    cnputc(db_lc[-1]);
 		}
 		break;
+	    case CTRL('w'):
+		/* erase previous word */
+		for (; db_lc > db_lbuf_start;) {
+		    if (*(db_lc - 1) != ' ')
+			break;
+		    db_delete(1, DEL_BWD);
+		}
+		for (; db_lc > db_lbuf_start;) {
+		    if (*(db_lc - 1) == ' ')
+			break;
+		    db_delete(1, DEL_BWD);
+		}
+		break;
 	    case CTRL('r'):
 		db_putstring("^R\n", 3);
 	    redraw:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710041154.v94BsFhk011913>