Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-11 Thread Scott Kostyshak
On Wed, Mar 11, 2020 at 03:43:00PM +0100, Jean-Marc Lasgouttes wrote: > Le 10/03/2020 à 15:31, Scott Kostyshak a écrit : > > Perhaps the following be more reasonable and safer? > > > >setCursor(cur, cur.pit(), cur.pos()); > > > > The above seems safe since I'm just changing "0" to "cur.pos()"

Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-11 Thread Jean-Marc Lasgouttes
Le 10/03/2020 à 15:31, Scott Kostyshak a écrit : Perhaps the following be more reasonable and safer? setCursor(cur, cur.pit(), cur.pos()); The above seems safe since I'm just changing "0" to "cur.pos()", and I don't see how the length of the paragraph can change after this operation. This

Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-11 Thread Scott Kostyshak
On Tue, Mar 10, 2020 at 04:56:35PM +0100, Pavel Sanda wrote: > On Tue, Mar 10, 2020 at 10:31:10AM -0400, Scott Kostyshak wrote: > > your questions. I tried to test regarding Pavel's concern, but I don't > > know a situation when the depth changes; > > Actually you are likely right. The destructio

Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-10 Thread Pavel Sanda
On Tue, Mar 10, 2020 at 10:31:10AM -0400, Scott Kostyshak wrote: > your questions. I tried to test regarding Pavel's concern, but I don't > know a situation when the depth changes; Actually you are likely right. The destruction of depth structure comes with moving paragraphs lfuns, not outlines-u

Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-10 Thread Scott Kostyshak
On Tue, Mar 10, 2020 at 08:55:06AM +0100, Pavel Sanda wrote: > On Tue, Mar 10, 2020 at 01:24:31AM -0400, Richard Kimberly Heck wrote: > > On 3/9/20 9:25 PM, Scott Kostyshak wrote: > > > Is there a reason to do the following for outline-up and outline-down? > > > > > > setCursor(cur, cur.pit(), 0)

Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-10 Thread Pavel Sanda
On Tue, Mar 10, 2020 at 01:24:31AM -0400, Richard Kimberly Heck wrote: > On 3/9/20 9:25 PM, Scott Kostyshak wrote: > > Is there a reason to do the following for outline-up and outline-down? > > > > setCursor(cur, cur.pit(), 0); > > > > It does not seem to be necessary in my testing, but I'm wonde

Re: [PATCH] outline-up/down: preserve cursor's position

2020-03-09 Thread Richard Kimberly Heck
On 3/9/20 9:25 PM, Scott Kostyshak wrote: > Is there a reason to do the following for outline-up and outline-down? > > setCursor(cur, cur.pit(), 0); > > It does not seem to be necessary in my testing, but I'm wondering if > there's a case I'm missing. Or perhaps it is not necessary but is > desir

[PATCH] outline-up/down: preserve cursor's position

2020-03-09 Thread Scott Kostyshak
3 -0400 Subject: [PATCH] outline-up/down: preserve cursor's position There is no need to set the cursor's position to the beginning of the line. This change does not affect the behavior of using the buttons in the Outliner pane, but is useful for using the keyboard shortcuts. --- src/Text3.c