tauto-insert second line for expand - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 22d10fe65586f5b0a5b212950a4caff776b6288a
DIR parent f8dea3c178590517e6f8833a2953c10c31ddbffc
HTML Author: rsc <devnull@localhost>
Date: Fri, 16 Dec 2005 15:27:18 +0000
auto-insert second line for expand
Diffstat:
M src/cmd/acme/wind.c | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
DIR diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c
t@@ -122,6 +122,12 @@ wintaglines(Window *w, Rectangle r)
if(n < w->taglines)
n = w->taglines;
+ /* on initial expansion, create an extra line */
+ if(n < 2){
+ rune = '\n';
+ textinsert(&w->tag, w->tag.file->b.nc, &rune, 1, TRUE);
+ n = 2;
+ }
return n;
}