Re: [patch] Fix color when branch name has a space

2017-03-31 Thread Scott Kostyshak
On Tue, Mar 14, 2017 at 01:01:23AM -0400, Scott Kostyshak wrote: > On Mon, Mar 13, 2017 at 11:03:40AM +0100, Jean-Marc Lasgouttes wrote: > > > Question, why don't you += to append stuff to a string? > > I just forget. I will do this for the next patch. I think I realize why it's not natural to

Re: [patch] Fix color when branch name has a space

2017-03-18 Thread Scott Kostyshak
On Sat, Mar 18, 2017 at 05:49:30PM +0100, Jean-Marc Lasgouttes wrote: > Le 18/03/2017 à 17:02, Scott Kostyshak a écrit : > > On Tue, Mar 14, 2017 at 01:01:23AM -0400, Scott Kostyshak wrote: > > > > > I have a patch and it seems to work well. I want to clean it up before > > > posting. I will post

Re: [patch] Fix color when branch name has a space

2017-03-18 Thread Jean-Marc Lasgouttes
Le 18/03/2017 à 17:02, Scott Kostyshak a écrit : On Tue, Mar 14, 2017 at 01:01:23AM -0400, Scott Kostyshak wrote: I have a patch and it seems to work well. I want to clean it up before posting. I will post it again for review because even though it seems to work well, I wonder if there is a

Re: [patch] Fix color when branch name has a space

2017-03-18 Thread Scott Kostyshak
On Tue, Mar 14, 2017 at 01:01:23AM -0400, Scott Kostyshak wrote: > I have a patch and it seems to work well. I want to clean it up before > posting. I will post it again for review because even though it seems to > work well, I wonder if there is a cleaner way of doing it. I will post > a cleaned

Re: [patch] Fix color when branch name has a space

2017-03-13 Thread Scott Kostyshak
On Mon, Mar 13, 2017 at 11:03:40AM +0100, Jean-Marc Lasgouttes wrote: > Le 07/03/2017 à 06:08, Scott Kostyshak a écrit : > > For the first patch, I changed the write() routine to add quotes around > > the branch name. Otherwise, read() gets confused. But should I instead > > have changed the read

Re: [patch] Fix color when branch name has a space

2017-03-13 Thread Jean-Marc Lasgouttes
Le 07/03/2017 à 06:08, Scott Kostyshak a écrit : For the first patch, I changed the write() routine to add quotes around the branch name. Otherwise, read() gets confused. But should I instead have changed the read routine()? Lexer::quoteString does what you need. And actually you could just

Re: [patch] Fix color when branch name has a space

2017-03-06 Thread Scott Kostyshak
On Tue, Nov 01, 2016 at 08:29:10PM +0100, Jean-Marc Lasgouttes wrote: > I am surprised that addArg does not need to add a space to the current > argument. It appears I got away with this because splitArg() handles double-quotes: // Extracts arguments from str into args. Arguments are delimted

Re: [patch] Fix color when branch name has a space

2016-11-01 Thread Jean-Marc Lasgouttes
Le 30/10/2016 à 21:57, Scott Kostyshak a écrit : As for the annoying code to build the command line, I'd say it would be nice to have some helpers like FuncRequuest::addArg(std::string) or something like that. Done in the attached patch. I am surprised that addArg does not need to add a

Re: [patch] Fix color when branch name has a space

2016-10-30 Thread Scott Kostyshak
17 00:00:00 2001 From: Scott Kostyshak <skost...@lyx.org> Date: Thu, 20 Oct 2016 22:41:31 -0400 Subject: [PATCH] Fix color when branch name has a space The arguments are now double-quoted. This is handled by a helper function, FuncRequest::addArg(). --- src/Buffer.cpp

Re: [patch] Fix color when branch name has a space

2016-10-21 Thread Jean-Marc Lasgouttes
Le 21/10/2016 à 04:47, Scott Kostyshak a écrit : Makes sense. I'll work on a better patch. Is the attached what you meant? If so I would audit the other calls to LFUN_SET_COLOR. Yes, I think so. Note that the double quotes are not really part of the syntax, they can be omitted as before.

Re: [patch] Fix color when branch name has a space

2016-10-20 Thread Scott Kostyshak
tch. Is the attached what you meant? If so I would audit the other calls to LFUN_SET_COLOR. Scott From 8ee7da3c15ca2ac8db338f9e8ba438b17a9029e3 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak <skost...@lyx.org> Date: Thu, 20 Oct 2016 22:41:31 -0400 Subject: [PATCH] Fix color when branch name has a space

Re: [patch] Fix color when branch name has a space

2016-10-14 Thread Scott Kostyshak
On Fri, Oct 14, 2016 at 07:16:36PM +0200, Jean-Marc Lasgouttes wrote: > Le 14/10/2016 à 17:51, Scott Kostyshak a écrit : > > Any thoughts? > > I would propose instead to use the helpers getArg and getLongArg in > FuncRequest. Two possibilities: > > lyx_name = cmd.getArg(0); > x11_name =

Re: [patch] Fix color when branch name has a space

2016-10-14 Thread Jean-Marc Lasgouttes
Le 14/10/2016 à 17:51, Scott Kostyshak a écrit : Any thoughts? I would propose instead to use the helpers getArg and getLongArg in FuncRequest. Two possibilities: lyx_name = cmd.getArg(0); x11_name = cmd.getLongArg(1); This will do what you want, at the price of a badly defined syntax: it

[patch] Fix color when branch name has a space

2016-10-14 Thread Scott Kostyshak
Any thoughts? Scott From dfd265bbcb4c00d06ddd064fa64da5000ebc5cb2 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak <skost...@lyx.org> Date: Fri, 14 Oct 2016 10:41:11 -0400 Subject: [PATCH] Fix color when branch name has a space The argument to set-color is " ", where in the