On Sat, Feb 14, 2015 at 10:11:02AM -0500, Scott Kostyshak wrote: > On Sat, Feb 14, 2015 at 5:06 AM, Jean-Marc Lasgouttes > <lasgout...@lyx.org> wrote: > > I'm not sure what your first chunk is doing. Besides, it is very strange > > that you need to know the position on the current row. Isn't this a screen > > update problem ? > > I agree. I just don't know how else to solve the "first word on a line > problem" (which happens if you take the first chunk out).
I'm just bumping this thread, in case someone takes an interest in getting this unstuck. I hope my patch (let me know if you want me to resend, it is on this thread two messages up) provides at least a starting point if someone is interested. Scott > > Scott > > > > > Sorry to be so terse, I'm reading on a phone. > > > > JMarc > > > > Le 14 février 2015 03:29:21 CET, Scott Kostyshak <skost...@lyx.org> a écrit > > : > >> > >> On Sun, Feb 8, 2015 at 4:14 PM, Scott Kostyshak <skost...@lyx.org> wrote: > >>> > >>> On Thu, Nov 20, 2014 at 3:28 AM, Scott Kostyshak <skost...@lyx.org> > >>> wrote: > >>>> > >>>> On Tue, Oct 28, 2014 at 7:03 AM, Scott Kostyshak <skost...@lyx.org> > >>>> wrote: > >>>>> > >>>>> I have a patch that enables "word selection mode" on double click. It > >>>>> seems to work well. The patch is here: > >>>>> > >>>>> > >>>>> http://www.lyx.org/trac/attachment/ticket/7890/0001-Fix-9160-and-7890.patch > >>>>> > >>>>> The only major issue is that when dragging to the left, > >>>>> you cannot > >>>>> highlight the first word. Does anyone have an idea for where to fix > >>>>> this? > >>>>> > >>>>> The following patch might give a clue as to where the problem is. When > >>>>> applied, you can select the first word. It is not meant to be taken as > >>>>> a correct patch: > >>>>> > >>>>> > >>>>> http://www.lyx.org/trac/attachment/ticket/7890/0002-HACK-just-to-show-where-the-problem-is.patch > >>>> > >>>> > >>>> I'm still looking for help on this in case anyone is motivated. > >>> > >>> > >>> Still looking for help on this (perhaps just a guess on where in the > >>> code to look to fix the problem?). It would be nice to put this into > >>> 2.2. > >> > >> > >> I've made some progress. The attached patch does not suffer from not > >> being able to select the first word on a line, except if the line > >> spans several "screen lines" (i.e. the line wraps). In > >> order to solve > >> the problem when the line is wrapped, how do I get the position of the > >> cursor on the visual line? I'm currently conditioning on pos() == 0. I > >> imagine I need to condition on something defined in frontend/ but I'm > >> not sure what. > >> > >> Scott
signature.asc
Description: PGP signature