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