plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 22d10fe65586f5b0a5b212950a4caff776b6288a
parent f8dea3c178590517e6f8833a2953c10c31ddbffc
Author: rsc <devnull@localhost>
Date:   Fri, 16 Dec 2005 15:27:18 +0000

auto-insert second line for expand

Diffstat:
Msrc/cmd/acme/wind.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c @@ -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; }