From 75bf276de5717ad356db6b5ab21f343697a10038 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Thu, 11 Aug 2011 11:53:42 +0430 Subject: [PATCH] add marks with mx and 'x commands --- txtwin.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/txtwin.c b/txtwin.c index 472300a..fe420a2 100644 --- a/txtwin.c +++ b/txtwin.c @@ -22,10 +22,6 @@ #define PAGESTEPS 8 #define CTRLKEY(x) ((x) - 96) -struct txtwin { - int n; -}; - static struct { char name[1 << 4]; char desc[1 << 8]; @@ -44,6 +40,7 @@ static FT_Bitmap *bitmap; static char text[MAXTEXT]; static char *pos = text; static int count; +static int mark[128]; static FT_Bitmap *create_bitmap(int width, int height) { @@ -214,6 +211,15 @@ void txtwin_loop(void) case 'i': printinfo(); continue; + case 'm': + c = readkey(); + if (isalnum(c)) + mark[c] = head; + continue; + case '\'': + c = readkey(); + head = mark[c]; + break; default: /* no need to redraw */ continue; -- 2.11.4.GIT