From 32582dad68899e479770dddbc33806fe876b452c Mon Sep 17 00:00:00 2001
From: Stan. S. Krupoderov <pashelper@gmail.com>
Date: Mon, 15 Jun 2009 02:05:20 +0400
Subject: [PATCH] fix set mark on delete_region
---
src/widget.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/widget.c b/src/widget.c
index b0fe757..ce790e6 100644
a
|
b
|
delete_region (WInput *in, int x_first, int x_last) |
1415 | 1415 | int last = max (x_first, x_last); |
1416 | 1416 | size_t len; |
1417 | 1417 | |
| 1418 | if (in->mark > first) |
| 1419 | in->mark = first; |
1418 | 1420 | in->point = first; |
1419 | | in->mark = first; |
1420 | | last = str_offset_to_pos (in->buffer, last); |
1421 | | first = str_offset_to_pos (in->buffer, first); |
1422 | | len = strlen (&in->buffer[last]) + 1; |
1423 | | memmove (&in->buffer[first], &in->buffer[last], len); |
1424 | | in->charpoint = 0; |
| 1421 | last = str_offset_to_pos (in->buffer, last); |
| 1422 | first = str_offset_to_pos (in->buffer, first); |
| 1423 | len = strlen (&in->buffer[last]) + 1; |
| 1424 | memmove (&in->buffer[first], &in->buffer[last], len); |
| 1425 | in->charpoint = 0; |
1425 | 1426 | in->need_push = 1; |
1426 | 1427 | } |
1427 | 1428 | |