Re: [dev] [vis][PATCH v2] Make the '.' Filerange work on one line

From: Marc André Tanner <mat_AT_brain-dump.org>
Date: Sun, 17 May 2015 13:01:59 +0200

On Fri, May 15, 2015 at 10:16:49AM +0200, Silvan Jegen wrote:
> ---
>
> The first version broke some functionality. This one doesn't by doing
> some more ugly checking.
>
> We also make sure that we include the newline by using text_line_next
> instead of text_line_finish.
>
> vis.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/vis.c b/vis.c
> index 051f256..a714bf0 100644
> --- a/vis.c
> +++ b/vis.c
> _AT_@ -1701,6 +1701,7 @@ static Filerange parse_range(char **cmd) {
> Text *txt = vis->win->file->text;
> Filerange r = text_range_empty();
> Mark *marks = vis->win->file->marks;
> + char orig = **cmd;
> switch (**cmd) {
> case '%':
> r.start = 0;
> _AT_@ -1714,8 +1715,11 @@ static Filerange parse_range(char **cmd) {
> break;
> default:
> r.start = parse_pos(cmd);
> - if (**cmd != ',')
> + if (orig != ',') {

This part is wrong. I commited a (hopefully) fixed version.

-- 
 Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
Received on Sun May 17 2015 - 13:01:59 CEST

This archive was generated by hypermail 2.3.0 : Sun May 17 2015 - 13:12:07 CEST