Ticket #407: 0001-fix-set-mark-on-delete_region.patch

File 0001-fix-set-mark-on-delete_region.patch, 1.1 KB (added by iNode, 15 years ago)

fix set mark on delete_region, patch formated by git instead of diff

  • src/widget.c

    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) 
    14151415   int last  = max (x_first, x_last); 
    14161416    size_t len; 
    14171417 
     1418   if (in->mark > first) 
     1419       in->mark  = first; 
    14181420   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; 
    14251426   in->need_push = 1; 
    14261427} 
    14271428