commit 1dfda8851bb1bb18a4bd334e7763e6e040a9f756
parent cf66ee3bc82e7571a8af0338988325e697715c0f
Author: ukai <ukai>
Date: Mon, 27 Jan 2003 16:18:48 +0000
[w3m-dev 03689] Re: fold patch
* fm.h (BufferPos): add bpos
* main.c (save_buffer_position): bpos initialize
(resetPos): reset bpos
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat:
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-28 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03689] Re: fold patch
+ * fm.h (BufferPos): add bpos
+ * main.c (save_buffer_position): bpos initialize
+ (resetPos): reset bpos
+
2003-01-26 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03686] Re: fold patch
diff --git a/fm.h b/fm.h
@@ -471,6 +471,7 @@ typedef struct _BufferPos {
long cur_linenumber;
int currentColumn;
int pos;
+ int bpos;
struct _BufferPos *next;
struct _BufferPos *prev;
} BufferPos;
diff --git a/main.c b/main.c
@@ -6313,6 +6313,7 @@ save_buffer_position(Buffer *buf)
b->cur_linenumber = CUR_LINENUMBER(buf);
b->currentColumn = buf->currentColumn;
b->pos = buf->pos;
+ b->bpos = buf->currentLine ? buf->currentLine->bpos : 0;
b->next = NULL;
b->prev = buf->undo;
if (buf->undo)
@@ -6328,6 +6329,7 @@ resetPos(BufferPos * b)
top.linenumber = b->top_linenumber;
cur.linenumber = b->cur_linenumber;
+ cur.bpos = b->bpos;
buf.topLine = ⊤
buf.currentLine = &cur;
buf.pos = b->pos;