Re: Remove duplicate history entries in command buffer

2022-07-13 Thread Jean-Marc Lasgouttes
Le 13/07/2022 à 17:49, Kornel Benko a écrit : Works nice. As expected, only the newly entered command is made uniq. IMHO this should go in. Thanks. This is in now. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: Remove duplicate history entries in command buffer

2022-07-13 Thread Kornel Benko
Am Wed, 13 Jul 2022 17:06:33 +0200 schrieb Jean-Marc Lasgouttes : > Le 13/07/2022 à 11:24, Kornel Benko a écrit : > > Am Wed, 13 Jul 2022 11:14:53 +0200 > > schrieb Jean-Marc Lasgouttes : > > > >> Le 13/07/2022 à 09:43, Kornel Benko a écrit : > > I suspect that the two command > > lis

Re: Remove duplicate history entries in command buffer

2022-07-13 Thread Jean-Marc Lasgouttes
Le 13/07/2022 à 11:24, Kornel Benko a écrit : Am Wed, 13 Jul 2022 11:14:53 +0200 schrieb Jean-Marc Lasgouttes : Le 13/07/2022 à 09:43, Kornel Benko a écrit : I suspect that the two command lists should be unified. Maybe in 2.5? I'll have a look. Thanks. Here is a patch, which nicely re

Re: Remove duplicate history entries in command buffer

2022-07-13 Thread Kornel Benko
Am Wed, 13 Jul 2022 11:14:53 +0200 schrieb Jean-Marc Lasgouttes : > Le 13/07/2022 à 09:43, Kornel Benko a écrit : > >>> I suspect that the two command > >>> lists should be unified. > > > > Maybe in 2.5? > > I'll have a look. Thanks. > >> I just discovered that the sexy and fast way of rem

Re: Remove duplicate history entries in command buffer

2022-07-13 Thread Jean-Marc Lasgouttes
Le 13/07/2022 à 09:43, Kornel Benko a écrit : I suspect that the two command lists should be unified. Maybe in 2.5? I'll have a look. I just discovered that the sexy and fast way of removing a string from a vector of strings is the erase-remove idiom: https://en.wikipedia.org/wiki/Erase%E2%

Re: Remove duplicate history entries in command buffer

2022-07-13 Thread Kornel Benko
Am Tue, 12 Jul 2022 22:56:56 +0200 schrieb Jean-Marc Lasgouttes : > Le 12/07/2022 à 22:19, Jean-Marc Lasgouttes a écrit : > > I won't complain more about removing from the whole history, but the > > original patch will need to be updated. I planned to commit your and mine patch. What else do you

Re: Remove duplicate history entries in command buffer

2022-07-12 Thread Jean-Marc Lasgouttes
Le 12/07/2022 à 22:19, Jean-Marc Lasgouttes a écrit : I won't complain more about removing from the whole history, but the original patch will need to be updated. I suspect that the two command lists should be unified. I just discovered that the sexy and fast way of removing a string from a v

Re: Remove duplicate history entries in command buffer

2022-07-12 Thread Jean-Marc Lasgouttes
Le 12/07/2022 à 22:15, Pavel Sanda a écrit : On Mon, Jul 11, 2022 at 02:25:49PM +0200, Kornel Benko wrote: Am Mon, 11 Jul 2022 13:37:31 +0200 schrieb Pavel Sanda : On Mon, Jul 11, 2022 at 10:53:23AM +0200, Kornel Benko wrote: So the outcome may be a new preference? Please no. Pavel What

Re: Remove duplicate history entries in command buffer

2022-07-12 Thread Pavel Sanda
On Mon, Jul 11, 2022 at 02:25:49PM +0200, Kornel Benko wrote: > Am Mon, 11 Jul 2022 13:37:31 +0200 > schrieb Pavel Sanda : > > > On Mon, Jul 11, 2022 at 10:53:23AM +0200, Kornel Benko wrote: > > > So the outcome may be a new preference? > > > > Please no. > > > > Pavel > > What is your prefer

Re: Remove duplicate history entries in command buffer

2022-07-11 Thread Kornel Benko
Am Mon, 11 Jul 2022 13:37:31 +0200 schrieb Pavel Sanda : > On Mon, Jul 11, 2022 at 10:53:23AM +0200, Kornel Benko wrote: > > So the outcome may be a new preference? > > Please no. > > Pavel What is your preference? Kornel pgpigoaERAeM9.pgp Description: Digitale Signatur von OpenPGP

Re: Remove duplicate history entries in command buffer

2022-07-11 Thread Pavel Sanda
On Mon, Jul 11, 2022 at 10:53:23AM +0200, Kornel Benko wrote: > So the outcome may be a new preference? Please no. Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: Remove duplicate history entries in command buffer

2022-07-11 Thread Kornel Benko
Am Mon, 11 Jul 2022 10:53:23 +0200 schrieb Kornel Benko : > Am Mon, 11 Jul 2022 00:15:40 +0200 > schrieb Jean-Marc Lasgouttes : > > > Le 10/07/2022 à 22:05, Kornel Benko a écrit : > > > So I was not clear enough. With 'duplicated' I meant anywhere in the > > > history. > > > > > > The (my) ar

Re: Remove duplicate history entries in command buffer

2022-07-11 Thread Kornel Benko
Am Mon, 11 Jul 2022 00:15:40 +0200 schrieb Jean-Marc Lasgouttes : > Le 10/07/2022 à 22:05, Kornel Benko a écrit : > > So I was not clear enough. With 'duplicated' I meant anywhere in the > > history. > > > > The (my) argument was seeing the session file full of the same commands > > spread all o

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Jean-Marc Lasgouttes
Le 10/07/2022 à 22:05, Kornel Benko a écrit : So I was not clear enough. With 'duplicated' I meant anywhere in the history. The (my) argument was seeing the session file full of the same commands spread all over the file, essentially shortening the maximum (different) commands possible. I was

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Kornel Benko
Am Sun, 10 Jul 2022 19:42:49 +0200 schrieb Jean-Marc Lasgouttes : > Le 10/07/2022 à 18:38, Kornel Benko a écrit : > > I don't get it. > > 1.) I like the rim(), was about to use it too ... but was unsure if > > sometimes > > one needs spaces at end. > > In this case, I can remove it from b

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Jean-Marc Lasgouttes
Le 10/07/2022 à 18:38, Kornel Benko a écrit : I don't get it. 1.) I like the rim(), was about to use it too ... but was unsure if sometimes one needs spaces at end. In this case, I can remove it from both cases. It is not right to maintain two lists and have one which is different from t

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Kornel Benko
Am Sun, 10 Jul 2022 18:08:06 +0200 schrieb Jean-Marc Lasgouttes : > Le 10/07/2022 à 15:23, Kornel Benko a écrit : > > Like this? Feel free to make it simpler. > > Rather like this. Note that your patch did not avoid duplicates on the > command list available from the up arrow icon. There are ind

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Jean-Marc Lasgouttes
Le 10/07/2022 à 15:23, Kornel Benko a écrit : Like this? Feel free to make it simpler. Rather like this. Note that your patch did not avoid duplicates on the command list available from the up arrow icon. There are indeed two lists that are more or less kept in sync. What a mess. What do yo

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Kornel Benko
Am Sun, 10 Jul 2022 15:05:43 +0200 schrieb Jean-Marc Lasgouttes : > Le 10/07/2022 à 11:46, Kornel Benko a écrit : > > While testing, using history in command buffer for some often repeated > > lyx-functions > > is often made difficult when the previous (but not now desired) command > > was repeat

Re: Remove duplicate history entries in command buffer

2022-07-10 Thread Jean-Marc Lasgouttes
Le 10/07/2022 à 11:46, Kornel Benko a écrit : While testing, using history in command buffer for some often repeated lyx-functions is often made difficult when the previous (but not now desired) command was repeated. Objections? I like it, but I would make it simpler, like if (not already th

Remove duplicate history entries in command buffer

2022-07-10 Thread Kornel Benko
While testing, using history in command buffer for some often repeated lyx-functions is often made difficult when the previous (but not now desired) command was repeated. Objections? Kornel diff --git a/src/Session.cpp b/src/Session.cpp index a814991e59..5595aedf8e 100644 --- a/src/Sessi