Re: Clone issue

2022-01-01 Thread Joel Kulesza
On Sat, Jan 1, 2022 at 1:10 PM Baris Erkus  wrote:

> On 01-Jan-22 11:02 PM, Joel Kulesza wrote:
>
>
>
> On Sat, Jan 1, 2022 at 12:54 PM Baris Erkus 
> wrote:
>
>> On 01-Jan-22 8:24 PM, Joel Kulesza wrote:
>>
>> On Sat, Jan 1, 2022 at 10:05 AM Baris Erkus 
>> wrote:
>>
>>> On 01-Jan-22 7:17 PM, Kornel Benko wrote:
>>> > Am Sat, 1 Jan 2022 19:11:38 +0300
>>> > schrieb Baris Erkus :
>>> >
>>> >> I am having difficulty to clone the repo with the following command:
>>> >>
>>> >> git clone git://git.lyx.org/lyx
>>> >>
>>> >> or
>>> >>
>>> >> git clone git://git.lyx.org/lyx.git
>>> >>
>>> >> The error is
>>> >>
>>> >> fatal: repository 'https://git.lyx.org/lyx.git/' not found
>>> >>
>>> >> For now, I have cloned the unofficial git repo from github and was
>>> able
>>> >> to compile the program.
>>> >>
>>> >> I have Windows 10 and Git 2.34.1 both x64
>>> >>
>>> > Better
>>> > git clone git://git.lyx.org/lyx
>>> >
>>> > ?
>>> >
>>> >   Kornel
>>> >
>>> Both commands did not work. :(
>>>
>>> I've had issues cloning from git.lyx.org, so I setup a mirror at
>> https://gitlab.com/jkulesza/lyx (git clone
>> https://gitlab.com/jkulesza/lyx.git).
>>
>> I have cloned the source from another mirror on Github, and was able to
>> compile it, so it is OK for now.
>>
>> I just wanted to use the original git repo. The git error is below:
>>
>> fatal: repository 'https://git.lyx.org/lyx.git/' not found
>>
>> I am sure it is trivial but could not catch it.
>>
> What happens if the trailing slash is removed?
>
> - Joel
>
> Does not work. I have tried this. Also tried removing the trailing lyx or
> lyx.git completely.
>
> The git error tells me that git is converting the "git://" protocol to "
> http://; protocol. The addresses "https://git.lyx.org/lyx.git/; and
> "https://git.lyx.org/lyx/;  whether with
> trailing slash or not, do not work on my web browser, so they are indeed
> inaccessible.
>
> Maybe something related to git and the address being anonymous
>

I would not expect these addresses to work in a web browser.  To view the
website related to this hosting service, you can visit https://git.lyx.org.
To clone the repository, one should be able to use `git clone git://
git.lyx.org/lyx`, though this latter step is what I've had trouble with.

Hope these thoughts help.

Thanks,
Joel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Baris Erkus

On 01-Jan-22 11:02 PM, Joel Kulesza wrote:



On Sat, Jan 1, 2022 at 12:54 PM Baris Erkus  
wrote:


On 01-Jan-22 8:24 PM, Joel Kulesza wrote:

On Sat, Jan 1, 2022 at 10:05 AM Baris Erkus
 wrote:

On 01-Jan-22 7:17 PM, Kornel Benko wrote:
> Am Sat, 1 Jan 2022 19:11:38 +0300
> schrieb Baris Erkus :
>
>> I am having difficulty to clone the repo with the
following command:
>>
>> git clone git://git.lyx.org/lyx 
>>
>> or
>>
>> git clone git://git.lyx.org/lyx.git

>>
>> The error is
>>
>> fatal: repository 'https://git.lyx.org/lyx.git/' not found
>>
>> For now, I have cloned the unofficial git repo from github
and was able
>> to compile the program.
>>
>> I have Windows 10 and Git 2.34.1 both x64
>>
> Better
> git clone git://git.lyx.org/lyx 
>
> ?
>
>       Kornel
>
Both commands did not work. :(

I've had issues cloning from git.lyx.org , so
I setup a mirror at https://gitlab.com/jkulesza/lyx (git clone
https://gitlab.com/jkulesza/lyx.git).


I have cloned the source from another mirror on Github, and was
able to compile it, so it is OK for now.

I just wanted to use the original git repo. The git error is below:

fatal: repository 'https://git.lyx.org/lyx.git/' not found

I am sure it is trivial but could not catch it.

What happens if the trailing slash is removed?

- Joel


Does not work. I have tried this. Also tried removing the trailing lyx 
or lyx.git completely.


The git error tells me that git is converting the "git://" protocol to 
"http://; protocol. The addresses "https://git.lyx.org/lyx.git/; and 
"https://git.lyx.org/lyx/; whether with trailing slash or not, do not 
work on my web browser, so they are indeed inaccessible.


Maybe something related to git and the address being anonymous
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Joel Kulesza
On Sat, Jan 1, 2022 at 12:54 PM Baris Erkus  wrote:

> On 01-Jan-22 8:24 PM, Joel Kulesza wrote:
>
> On Sat, Jan 1, 2022 at 10:05 AM Baris Erkus 
> wrote:
>
>> On 01-Jan-22 7:17 PM, Kornel Benko wrote:
>> > Am Sat, 1 Jan 2022 19:11:38 +0300
>> > schrieb Baris Erkus :
>> >
>> >> I am having difficulty to clone the repo with the following command:
>> >>
>> >> git clone git://git.lyx.org/lyx
>> >>
>> >> or
>> >>
>> >> git clone git://git.lyx.org/lyx.git
>> >>
>> >> The error is
>> >>
>> >> fatal: repository 'https://git.lyx.org/lyx.git/' not found
>> >>
>> >> For now, I have cloned the unofficial git repo from github and was able
>> >> to compile the program.
>> >>
>> >> I have Windows 10 and Git 2.34.1 both x64
>> >>
>> > Better
>> > git clone git://git.lyx.org/lyx
>> >
>> > ?
>> >
>> >   Kornel
>> >
>> Both commands did not work. :(
>>
>> I've had issues cloning from git.lyx.org, so I setup a mirror at
> https://gitlab.com/jkulesza/lyx (git clone
> https://gitlab.com/jkulesza/lyx.git).
>
> I have cloned the source from another mirror on Github, and was able to
> compile it, so it is OK for now.
>
> I just wanted to use the original git repo. The git error is below:
>
> fatal: repository 'https://git.lyx.org/lyx.git/' not found
>
> I am sure it is trivial but could not catch it.
>
What happens if the trailing slash is removed?

- Joel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Baris Erkus

On 01-Jan-22 8:24 PM, Joel Kulesza wrote:
On Sat, Jan 1, 2022 at 10:05 AM Baris Erkus  
wrote:


On 01-Jan-22 7:17 PM, Kornel Benko wrote:
> Am Sat, 1 Jan 2022 19:11:38 +0300
> schrieb Baris Erkus :
>
>> I am having difficulty to clone the repo with the following
command:
>>
>> git clone git://git.lyx.org/lyx 
>>
>> or
>>
>> git clone git://git.lyx.org/lyx.git 
>>
>> The error is
>>
>> fatal: repository 'https://git.lyx.org/lyx.git/' not found
>>
>> For now, I have cloned the unofficial git repo from github and
was able
>> to compile the program.
>>
>> I have Windows 10 and Git 2.34.1 both x64
>>
> Better
> git clone git://git.lyx.org/lyx 
>
> ?
>
>       Kornel
>
Both commands did not work. :(

I've had issues cloning from git.lyx.org , so I 
setup a mirror at https://gitlab.com/jkulesza/lyx (git clone 
https://gitlab.com/jkulesza/lyx.git).


I have cloned the source from another mirror on Github, and was able to 
compile it, so it is OK for now.


I just wanted to use the original git repo. The git error is below:

fatal: repository 'https://git.lyx.org/lyx.git/' not found

I am sure it is trivial but could not catch it.

--
↓↓
Please bottom-post. Start your reply here:
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Fix font inside footnote inset

2022-01-01 Thread Richard Kimberly Heck

On 12/31/21 07:11, Jean-Marc Lasgouttes wrote:

commit 0789f2f2ae43742da200a27f10403f4c6a68713d
Author: Jean-Marc Lasgouttes 
Date:   Fri Dec 3 12:16:40 2021 +0100

 Fix font inside footnote inset
 
 An inset that resets its font (like Footnote) does not care at all

 about enclosing font. Therefore the real starting point is the class
 default font. This avoid cases where the footnote contents is forced
 to \normalsize.


Thanks! I've been annoyed by this bug for a long time.

Riki


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Quick newbie question

2022-01-01 Thread Lorenzo Bertini

Il 01/01/22 17:54, Lorenzo Bertini ha scritto:

Dear list,

I found a bug and needed to bisect, so i moved back HEAD to an old 
commit, then configured and built. I went back to master and can't build 
anymore because its missing `nod.hpp` file; no git command seems to 
restore this file (git reset --hard, creating a new master branch 
tracking origin/master, etc).


I would like not to clone again as its very slow, but all I find on the 
internet are commands I already tried. What should i do?


Thank you in advance,

Lorenzo (lynx)


Update: file was never gone, just in its folder "3rdparty". Compilation 
now works after countless attemps, and I didn't really change anything :).

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Joel Kulesza
On Sat, Jan 1, 2022 at 10:05 AM Baris Erkus  wrote:

> On 01-Jan-22 7:17 PM, Kornel Benko wrote:
> > Am Sat, 1 Jan 2022 19:11:38 +0300
> > schrieb Baris Erkus :
> >
> >> I am having difficulty to clone the repo with the following command:
> >>
> >> git clone git://git.lyx.org/lyx
> >>
> >> or
> >>
> >> git clone git://git.lyx.org/lyx.git
> >>
> >> The error is
> >>
> >> fatal: repository 'https://git.lyx.org/lyx.git/' not found
> >>
> >> For now, I have cloned the unofficial git repo from github and was able
> >> to compile the program.
> >>
> >> I have Windows 10 and Git 2.34.1 both x64
> >>
> > Better
> > git clone git://git.lyx.org/lyx
> >
> > ?
> >
> >   Kornel
> >
> Both commands did not work. :(
>
> I've had issues cloning from git.lyx.org, so I setup a mirror at
https://gitlab.com/jkulesza/lyx (git clone
https://gitlab.com/jkulesza/lyx.git).

Perhaps try there?

Thanks,
Joel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Kornel Benko
Am Sat, 1 Jan 2022 20:05:00 +0300
schrieb Baris Erkus :

> On 01-Jan-22 7:17 PM, Kornel Benko wrote:
> > Am Sat, 1 Jan 2022 19:11:38 +0300
> > schrieb Baris Erkus :
> >  
> >> I am having difficulty to clone the repo with the following command:
> >>
> >> git clone git://git.lyx.org/lyx
> >>
> >> or
> >>
> >> git clone git://git.lyx.org/lyx.git
> >>
> >> The error is
> >>
> >> fatal: repository 'https://git.lyx.org/lyx.git/' not found
> >>
> >> For now, I have cloned the unofficial git repo from github and was able
> >> to compile the program.
> >>
> >> I have Windows 10 and Git 2.34.1 both x64
> >>  
> > Better
> > git clone git://git.lyx.org/lyx
> >
> > ?
> >
> > Kornel
> >  
> Both commands did not work. :(
> 

Works here. Just tried. What is the message from from git?

Kornel


pgp0hNVuF4xXj.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Baris Erkus

On 01-Jan-22 7:17 PM, Kornel Benko wrote:

Am Sat, 1 Jan 2022 19:11:38 +0300
schrieb Baris Erkus :


I am having difficulty to clone the repo with the following command:

git clone git://git.lyx.org/lyx

or

git clone git://git.lyx.org/lyx.git

The error is

fatal: repository 'https://git.lyx.org/lyx.git/' not found

For now, I have cloned the unofficial git repo from github and was able
to compile the program.

I have Windows 10 and Git 2.34.1 both x64


Better
git clone git://git.lyx.org/lyx

?

Kornel


Both commands did not work. :(

--
↓↓
Please bottom-post. Start your reply here:

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Quick newbie question

2022-01-01 Thread Lorenzo Bertini

Dear list,

I found a bug and needed to bisect, so i moved back HEAD to an old 
commit, then configured and built. I went back to master and can't build 
anymore because its missing `nod.hpp` file; no git command seems to 
restore this file (git reset --hard, creating a new master branch 
tracking origin/master, etc).


I would like not to clone again as its very slow, but all I find on the 
internet are commands I already tried. What should i do?


Thank you in advance,

Lorenzo (lynx)
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Text entered at different place than cursor

2022-01-01 Thread Kornel Benko
Am Sat, 1 Jan 2022 17:13:04 +0100
schrieb Jean-Marc Lasgouttes :

> Le 01/01/2022 à 15:09, Kornel Benko a écrit :
> >> Open the example.
> >> Close comment.
> >> You see the space before the comment.
> >> Place cursor behind the space (but before the comment).
> >> Open comment => cursor is moved into comment.  
> > 
> > Forget it. Opening the comment via right-click works as expected.  
> 
> Indeed LyX 2.3 does the same.
> 
> However I notice that LyX 2.3 does show the space before the opened 
> note, whereas my recent changes hide the space as at a automatic line break.
> 
> What is the preferred behavior? In fact, it would have been easier to 
> get the 2.3 behavior, so if it is good, I might as well redo the patch.
> 
> JMarc

I'd prefer to see the space if possible.

Kornel


pgp5bjRMJHrnM.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Clone issue

2022-01-01 Thread Kornel Benko
Am Sat, 1 Jan 2022 19:11:38 +0300
schrieb Baris Erkus :

> I am having difficulty to clone the repo with the following command:
> 
> git clone git://git.lyx.org/lyx
> 
> or
> 
> git clone git://git.lyx.org/lyx.git
> 
> The error is
> 
> fatal: repository 'https://git.lyx.org/lyx.git/' not found
> 
> For now, I have cloned the unofficial git repo from github and was able 
> to compile the program.
> 
> I have Windows 10 and Git 2.34.1 both x64
> 

Better
git clone git://git.lyx.org/lyx

?

Kornel


pgp6ccBdjcMUt.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Text entered at different place than cursor

2022-01-01 Thread Jean-Marc Lasgouttes

Le 01/01/2022 à 15:09, Kornel Benko a écrit :

Open the example.
Close comment.
You see the space before the comment.
Place cursor behind the space (but before the comment).
Open comment => cursor is moved into comment.


Forget it. Opening the comment via right-click works as expected.


Indeed LyX 2.3 does the same.

However I notice that LyX 2.3 does show the space before the opened 
note, whereas my recent changes hide the space as at a automatic line break.


What is the preferred behavior? In fact, it would have been easier to 
get the 2.3 behavior, so if it is good, I might as well redo the patch.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Clone issue

2022-01-01 Thread Baris Erkus

I am having difficulty to clone the repo with the following command:

git clone git://git.lyx.org/lyx

or

git clone git://git.lyx.org/lyx.git

The error is

fatal: repository 'https://git.lyx.org/lyx.git/' not found

For now, I have cloned the unofficial git repo from github and was able 
to compile the program.


I have Windows 10 and Git 2.34.1 both x64

--
↓↓
Please bottom-post. Start your reply here:

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Text entered at different place than cursor

2022-01-01 Thread Kornel Benko
Am Sat, 1 Jan 2022 14:44:17 +0100
schrieb Kornel Benko :

> Am Sat, 1 Jan 2022 14:06:53 +0100
> schrieb Jean-Marc Lasgouttes :
> 
> > Le 15/12/2021 à 13:51, Scott Kostyshak a écrit :  
> > > In the attached example, there is a space between the main text and the
> > > note inset. If I put the cursor at the end of the second visual line
> > > (see the screenshot for what I refer to visual lines), it appears to be
> > > after the space, but if I enter text it is entered before the space.
> > > 
> > > JMarc, I'm guessing this is for you?
> > 
> > Here is a tentative fix. I'd appreciate if somebody could give it a 
> > quick go before I commit, since I could have forgotten something obvious 
> > and embarrassing.
> > 
> > Best wishes,
> > JMarc  
> 
> Open the example.
> Close comment.
> You see the space before the comment.
> Place cursor behind the space (but before the comment).
> Open comment => cursor is moved into comment.
> 
>   Kornel

Forget it. Opening the comment via right-click works as expected.

Kornel


pgpg7mXD1fYUf.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Text entered at different place than cursor

2022-01-01 Thread Kornel Benko
Am Sat, 1 Jan 2022 14:06:53 +0100
schrieb Jean-Marc Lasgouttes :

> Le 15/12/2021 à 13:51, Scott Kostyshak a écrit :
> > In the attached example, there is a space between the main text and the
> > note inset. If I put the cursor at the end of the second visual line
> > (see the screenshot for what I refer to visual lines), it appears to be
> > after the space, but if I enter text it is entered before the space.
> > 
> > JMarc, I'm guessing this is for you?  
> 
> Here is a tentative fix. I'd appreciate if somebody could give it a 
> quick go before I commit, since I could have forgotten something obvious 
> and embarrassing.
> 
> Best wishes,
> JMarc

Open the example.
Close comment.
You see the space before the comment.
Place cursor behind the space (but before the comment).
Open comment => cursor is moved into comment.

Kornel


pgppPF7rK2skS.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Text entered at different place than cursor

2022-01-01 Thread Jean-Marc Lasgouttes

Le 15/12/2021 à 13:51, Scott Kostyshak a écrit :

In the attached example, there is a space between the main text and the
note inset. If I put the cursor at the end of the second visual line
(see the screenshot for what I refer to visual lines), it appears to be
after the space, but if I enter text it is entered before the space.

JMarc, I'm guessing this is for you?


Here is a tentative fix. I'd appreciate if somebody could give it a 
quick go before I commit, since I could have forgotten something obvious 
and embarrassing.


Best wishes,
JMarcFrom ebaf374113aec5e7734708661eb99ec35d02282d Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Tue, 28 Dec 2021 20:56:57 +0100
Subject: [PATCH] Better handling of trailing spaces in rows.

When a string is broken at the margin by the Qt algorithm, the space
at which breaking occurred is automatically skipped in width
computation. However, the ending space of the string is taken into
account and is visible for example at paragraph end.

When the trailing space is followed by a displayed inset, then the
space should be skipped too, which means that the width of the last
row element has to be recomputed. For the sake of performance, the
width of the element without trailing spaces is computed in advance in
FontMetrics::breakString.

This "no space" width will be used when trimming a row element of its trailing
spaces instead of the original one.

Fixes bug with trailing space before display inset.
---
 src/Row.cpp |  2 ++
 src/Row.h   |  4 +++-
 src/frontends/FontMetrics.h |  7 +-
 src/frontends/qt/GuiFontMetrics.cpp | 35 -
 4 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/src/Row.cpp b/src/Row.cpp
index 6d6d319194..41b9ce0596 100644
--- a/src/Row.cpp
+++ b/src/Row.cpp
@@ -172,6 +172,7 @@ bool Row::Element::splitAt(int const width, int next_width, bool force,
 		e.str = str.substr(i, brk.len);
 		e.endpos = e.pos + brk.len;
 		e.dim.wid = brk.wid;
+		e.nspc_wid = brk.nspc_wid;
 		e.row_flags = CanBreakInside | BreakAfter;
 		if (first) {
 			// this element eventually goes to *this
@@ -218,6 +219,7 @@ void Row::Element::rtrim()
 	 */
 	str = support::rtrim(str);
 	endpos = pos + str.length();
+	dim.wid = nspc_wid;
 }
 
 
diff --git a/src/Row.h b/src/Row.h
index 2c60638f34..aba7913fdb 100644
--- a/src/Row.h
+++ b/src/Row.h
@@ -119,9 +119,11 @@ public:
 		pos_type pos;
 		// first position after the element in the paragraph
 		pos_type endpos;
-		// The dimension of the chunk (does not contains the
+		// The dimension of the chunk (does not contain the
 		// separator correction)
 		Dimension dim;
+		// The width of the element without trailing spaces
+		int nspc_wid = 0;
 
 		// Non-zero only if element is an inset
 		Inset const * inset = nullptr;
diff --git a/src/frontends/FontMetrics.h b/src/frontends/FontMetrics.h
index b78bc2dbcd..66cd22d439 100644
--- a/src/frontends/FontMetrics.h
+++ b/src/frontends/FontMetrics.h
@@ -126,9 +126,14 @@ public:
 
 	// The places where to break a string and the width of the resulting lines.
 	struct Break {
-		Break(int l, int w) : len(l), wid(w) {}
+		Break(int l, int w, int nsw) : len(l), wid(w), nspc_wid(nsw) {}
+		// Number of characters
 		int len = 0;
+		// text width
 		int wid = 0;
+		// text width when trailing spaces are removed; only makes a
+		// difference for the last break.
+		int nspc_wid = 0;
 	};
 	typedef std::vector Breaks;
 	/**
diff --git a/src/frontends/qt/GuiFontMetrics.cpp b/src/frontends/qt/GuiFontMetrics.cpp
index e638e10d09..0dc0de5cb4 100644
--- a/src/frontends/qt/GuiFontMetrics.cpp
+++ b/src/frontends/qt/GuiFontMetrics.cpp
@@ -19,7 +19,6 @@
 
 #include "support/convert.h"
 #include "support/lassert.h"
-#include "support/lstrings.h"
 #include "support/lyxlib.h"
 #include "support/debug.h"
 
@@ -579,9 +578,6 @@ GuiFontMetrics::breakString_helper(docstring const & s, int first_wid, int wid,
 	 */
 	to.setWrapMode(force ? QTextOption::WrapAtWordBoundaryOrAnywhere
 	 : QTextOption::WordWrap);
-	// Let QTextLine::naturalTextWidth() account for trailing spaces
-	// (horizontalAdvance() still does not).
-	to.setFlags(QTextOption::IncludeTrailingSpaces);
 	tl.setTextOption(to);
 
 	bool first = true;
@@ -600,26 +596,43 @@ GuiFontMetrics::breakString_helper(docstring const & s, int first_wid, int wid,
 	int pos = 0;
 	for (int i = 0 ; i < tl.lineCount() ; ++i) {
 		QTextLine const & line = tl.lineAt(i);
-		int const epos = brkstr2str_pos(qs, s, line.textStart() + line.textLength());
+		int const line_epos = line.textStart() + line.textLength();
+		int const epos = brkstr2str_pos(qs, s, line_epos);
 #if QT_VERSION >= 0x05
-		int const wid = i + 1 < tl.lineCount() ? iround(line.horizontalAdvance())
-		   : iround(line.naturalTextWidth());
+		// This does not take trailing spaces into account, except for the last line.
+		int const wid = 

Re: Why do we add converters in frontends GuiPrefs.cpp?

2022-01-01 Thread Jean-Marc Lasgouttes

Le 28/12/2021 à 14:07, José Abílio Matos a écrit :

Hi all,

   while searching in order to solve the python issues, I searched for 
all the occurrences of "$$o" in src/



$ grep -r '$$o' src/*


The only case where I was surprised were the case of frontends GuiPrefs.cpp:

[...]


Does any one knows why we are injecting these calls manually there?


Hi José,

These are forward search commands. These could probably be done in 
configure script instead.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel