Re: Bug in 2.0RC1? language changing change the language of already written text.
Le 09/03/2011 07:24, Stephan Witt a écrit : Ah, ok - I didn't thought of that. But it's not exactly the same. When in front of a word the selection is not done too. That raises the question if it's better or not to use WHOLE_WORD_STRICT... When entering hebrew text is the word end at from() or at the to() pos? Note that this is what is used for fonts in Text::toggleFree. I would think the two actions should behave similarly. JMarc
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 09.03.2011 um 10:29 schrieb Jean-Marc Lasgouttes: Le 09/03/2011 07:24, Stephan Witt a écrit : Ah, ok - I didn't thought of that. But it's not exactly the same. When in front of a word the selection is not done too. That raises the question if it's better or not to use WHOLE_WORD_STRICT... When entering hebrew text is the word end at from() or at the to() pos? Note that this is what is used for fonts in Text::toggleFree. I would think the two actions should behave similarly. I did it that way. I had a positive feedback from Ronen. (Thanks for that.) Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
Le 09/03/2011 07:24, Stephan Witt a écrit : Ah, ok - I didn't thought of that. But it's not exactly the same. When in front of a word the selection is not done too. That raises the question if it's better or not to use WHOLE_WORD_STRICT... When entering hebrew text is the word end at from() or at the to() pos? Note that this is what is used for fonts in Text::toggleFree. I would think the two actions should behave similarly. JMarc
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 09.03.2011 um 10:29 schrieb Jean-Marc Lasgouttes: > Le 09/03/2011 07:24, Stephan Witt a écrit : >> Ah, ok - I didn't thought of that. But it's not exactly the same. >> When in front of a word the selection is not done too. That raises the >> question if it's better or not to use WHOLE_WORD_STRICT... >> When entering hebrew text is the word end at from() or at the to() pos? > > Note that this is what is used for fonts in Text::toggleFree. I would think > the two actions should behave similarly. I did it that way. I had a positive feedback from Ronen. (Thanks for that.) Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 08.03.2011 um 16:51 schrieb Ronen Abravanel: Hello, I started using LyX 2.0RC1, and by now, there is only one thing that bothers me: While I'm typing a document in one language, and then, when the cursor is right after the last word (with no space), I'm typing language hebrew in the minibuffer (or: using predefined shortcuts that commits the same). The language do changes, but the last word is also marked and it's language switched. For example, If I write one two^, and when the cursor is where the ^ is, changes the language, it will convert into one [owt], when the two is reversed, as it thinks it's in Hebrew, and the [ - ] part is marked. This is new behavior - it was not there in some previous versions of 2.0, but it's there in beta 4. Yes, this is new - but it's meant as a feature. If you change the language without any selection LyX changes the language of the word under the cursor. Do you want to change the language for the delimiter following the word? Sorry, I don't know anything about hebrew. Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
My most common situation in which this is a problem is the following Hebrew text (English translation) more hebrew.. For most language, you wouldn't mind if the ( ) will be in English or in other language, but Hebrew is written from right to left, which means the Parentheses are written in reverse. Meaning, if the closing parentheses will be in English, it will apear as: Hebrew text ((English Hebrew (Or something like that) there fore, the following parentheses or comma must be at the same language as the paragraph language, and not as the last-word language. My override now is hebrew (english ) hebrew, or hebrew english , hebrew [note the space before the comma or the closing parentheses], and that's both ugly and wrong. An Hebrew example: כותב בעברית (english) עברית -- In this way its typed when the closing parentheses is hebrew כותב בעברית ((english עברית. -- here the closing parentheses is english Thanks, Ronen. On Tue, Mar 8, 2011 at 6:18 PM, Stephan Witt st.w...@gmx.net wrote: Am 08.03.2011 um 16:51 schrieb Ronen Abravanel: Hello, I started using LyX 2.0RC1, and by now, there is only one thing that bothers me: While I'm typing a document in one language, and then, when the cursor is right after the last word (with no space), I'm typing language hebrew in the minibuffer (or: using predefined shortcuts that commits the same). The language do changes, but the last word is also marked and it's language switched. For example, If I write one two^, and when the cursor is where the ^ is, changes the language, it will convert into one [owt], when the two is reversed, as it thinks it's in Hebrew, and the [ - ] part is marked. This is new behavior - it was not there in some previous versions of 2.0, but it's there in beta 4. Yes, this is new - but it's meant as a feature. If you change the language without any selection LyX changes the language of the word under the cursor. Do you want to change the language for the delimiter following the word? Sorry, I don't know anything about hebrew. Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 08.03.2011 um 17:36 schrieb Ronen Abravanel: My most common situation in which this is a problem is the following Hebrew text (English translation) more hebrew.. For most language, you wouldn't mind if the ( ) will be in English or in other language, but Hebrew is written from right to left, which means the Parentheses are written in reverse. Meaning, if the closing parentheses will be in English, it will apear as: Hebrew text ((English Hebrew (Or something like that) there fore, the following parentheses or comma must be at the same language as the paragraph language, and not as the last-word language. I believe you. The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? Stephan /Users/Shared/LyX ~/cvs/lyx /Users/Shared/LyX/lyx-build/LyX-2.0.0svn.build Index: src/Text3.cpp === --- src/Text3.cpp (Revision 37877) +++ src/Text3.cpp (Arbeitskopie) @@ -1890,7 +1890,8 @@ Language const * lang = languages.getLanguage(to_utf8(cmd.argument())); if (!lang) break; - selectWordWhenUnderCursor(cur, WHOLE_WORD); + if (!cur.paragraph().isWordSeparator(cur.pos())) + selectWordWhenUnderCursor(cur, WHOLE_WORD); Font font(ignore_font, lang); toggleAndShow(cur, this, font); break;
Re: Bug in 2.0RC1? language changing change the language of already written text.
Works grate for me... On Tue, Mar 8, 2011 at 10:54 PM, Stephan Witt st.w...@gmx.net wrote: Am 08.03.2011 um 17:36 schrieb Ronen Abravanel: My most common situation in which this is a problem is the following Hebrew text (English translation) more hebrew.. For most language, you wouldn't mind if the ( ) will be in English or in other language, but Hebrew is written from right to left, which means the Parentheses are written in reverse. Meaning, if the closing parentheses will be in English, it will apear as: Hebrew text ((English Hebrew (Or something like that) there fore, the following parentheses or comma must be at the same language as the paragraph language, and not as the last-word language. I believe you. The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
Stephan Witt wrote: The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? maybe add comment into code for the next generations? pavel
Re: Bug in 2.0RC1? language changing change the language of already written text.
Le 08/03/2011 21:54, Stephan Witt a écrit : The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? You can simply use WHOLE_WORD_STRICT instead of WHOLE_WORD to get this effect. JMarc
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 08.03.2011 um 23:09 schrieb Jean-Marc Lasgouttes: Le 08/03/2011 21:54, Stephan Witt a écrit : The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? You can simply use WHOLE_WORD_STRICT instead of WHOLE_WORD to get this effect. Ah, ok - I didn't thought of that. But it's not exactly the same. When in front of a word the selection is not done too. That raises the question if it's better or not to use WHOLE_WORD_STRICT... When entering hebrew text is the word end at from() or at the to() pos? Stephan PS. Ronen, if you want to try it - the patch is attached. /Users/Shared/LyX ~/cvs/lyx /Users/Shared/LyX/lyx-build/LyX-2.0.0svn.build Index: src/Text3.cpp === --- src/Text3.cpp (Revision 37885) +++ src/Text3.cpp (Arbeitskopie) @@ -1890,7 +1890,7 @@ Language const * lang = languages.getLanguage(to_utf8(cmd.argument())); if (!lang) break; - selectWordWhenUnderCursor(cur, WHOLE_WORD); + selectWordWhenUnderCursor(cur, WHOLE_WORD_STRICT); Font font(ignore_font, lang); toggleAndShow(cur, this, font); break;
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 08.03.2011 um 16:51 schrieb Ronen Abravanel: > Hello, > > I started using LyX 2.0RC1, and by now, there is only one thing that bothers > me: > While I'm typing a document in one language, and then, when the cursor is > right after the last word (with no space), I'm typing "language hebrew" in > the minibuffer (or: using predefined shortcuts that commits the same). The > language do changes, but the last word is also marked and it's language > switched. > > For example, If I write "one two^", and when the cursor is where the ^ is, > changes the language, it will convert into "one [owt]", when the "two" is > reversed, as it "thinks" it's in Hebrew, and the [ - ] part is marked. > > This is new behavior - it was not there in some previous versions of 2.0, but > it's there in beta 4. Yes, this is new - but it's meant as a feature. If you change the language without any selection LyX changes the language of the word under the cursor. Do you want to change the language for the delimiter following the word? Sorry, I don't know anything about hebrew. Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
My most common situation in which this is a problem is the following Hebrew text (English translation) more hebrew.. For most language, you wouldn't mind if the " ( )" will be in English or in other language, but Hebrew is written from right to left, which means the Parentheses are written in reverse. Meaning, if the closing parentheses will be in English, it will apear as: Hebrew text ((English Hebrew (Or something like that) there fore, the following parentheses or comma must be at the same language as the paragraph language, and not as the last-word language. My override now is hebrew (english ) hebrew, or hebrew english , hebrew [note the space before the comma or the closing parentheses], and that's both ugly and wrong. An Hebrew example: כותב בעברית (english) עברית -- In this way its typed when the closing parentheses is hebrew כותב בעברית ((english עברית. -- here the closing parentheses is english Thanks, Ronen. On Tue, Mar 8, 2011 at 6:18 PM, Stephan Wittwrote: > Am 08.03.2011 um 16:51 schrieb Ronen Abravanel: > > > Hello, > > > > I started using LyX 2.0RC1, and by now, there is only one thing that > bothers me: > > While I'm typing a document in one language, and then, when the cursor is > right after the last word (with no space), I'm typing "language hebrew" in > the minibuffer (or: using predefined shortcuts that commits the same). The > language do changes, but the last word is also marked and it's language > switched. > > > > For example, If I write "one two^", and when the cursor is where the ^ > is, changes the language, it will convert into "one [owt]", when the "two" > is reversed, as it "thinks" it's in Hebrew, and the [ - ] part is marked. > > > > This is new behavior - it was not there in some previous versions of 2.0, > but it's there in beta 4. > > Yes, this is new - but it's meant as a feature. > If you change the language without any selection LyX changes the language > of the word under the cursor. > > Do you want to change the language for the delimiter following the word? > Sorry, I don't know anything about hebrew. > > Stephan
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 08.03.2011 um 17:36 schrieb Ronen Abravanel: > My most common situation in which this is a problem is the following > > Hebrew text (English translation) more hebrew.. > > For most language, you wouldn't mind if the " ( )" will be in English or in > other language, but Hebrew is written from right to left, which means the > Parentheses are written in reverse. Meaning, if the closing parentheses will > be in English, it will apear as: > > Hebrew text ((English Hebrew > > (Or something like that) > > there fore, the following parentheses or comma must be at the same language > as the paragraph language, and not as the last-word language. I believe you. The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? Stephan /Users/Shared/LyX ~/cvs/lyx /Users/Shared/LyX/lyx-build/LyX-2.0.0svn.build Index: src/Text3.cpp === --- src/Text3.cpp (Revision 37877) +++ src/Text3.cpp (Arbeitskopie) @@ -1890,7 +1890,8 @@ Language const * lang = languages.getLanguage(to_utf8(cmd.argument())); if (!lang) break; - selectWordWhenUnderCursor(cur, WHOLE_WORD); + if (!cur.paragraph().isWordSeparator(cur.pos())) + selectWordWhenUnderCursor(cur, WHOLE_WORD); Font font(ignore_font, lang); toggleAndShow(cur, this, font); break;
Re: Bug in 2.0RC1? language changing change the language of already written text.
Works grate for me... On Tue, Mar 8, 2011 at 10:54 PM, Stephan Wittwrote: > Am 08.03.2011 um 17:36 schrieb Ronen Abravanel: > > > My most common situation in which this is a problem is the following > > > > Hebrew text (English translation) more hebrew.. > > > > For most language, you wouldn't mind if the " ( )" will be in English or > in other language, but Hebrew is written from right to left, which means the > Parentheses are written in reverse. Meaning, if the closing parentheses > will be in English, it will apear as: > > > > Hebrew text ((English Hebrew > > > > (Or something like that) > > > > there fore, the following parentheses or comma must be at the same > language as the paragraph language, and not as the last-word language. > > I believe you. > > The attached patch changes this to restore the old behavior when cursor is > at the word end. > Ok to apply? > > Stephan > >
Re: Bug in 2.0RC1? language changing change the language of already written text.
Stephan Witt wrote: > The attached patch changes this to restore the old behavior when cursor is at > the word end. > Ok to apply? maybe add comment into code for the next generations? pavel
Re: Bug in 2.0RC1? language changing change the language of already written text.
Le 08/03/2011 21:54, Stephan Witt a écrit : The attached patch changes this to restore the old behavior when cursor is at the word end. Ok to apply? You can simply use WHOLE_WORD_STRICT instead of WHOLE_WORD to get this effect. JMarc
Re: Bug in 2.0RC1? language changing change the language of already written text.
Am 08.03.2011 um 23:09 schrieb Jean-Marc Lasgouttes: > Le 08/03/2011 21:54, Stephan Witt a écrit : >> The attached patch changes this to restore the old behavior when cursor is >> at the word end. >> Ok to apply? > > You can simply use WHOLE_WORD_STRICT instead of WHOLE_WORD to get this effect. Ah, ok - I didn't thought of that. But it's not exactly the same. When in front of a word the selection is not done too. That raises the question if it's better or not to use WHOLE_WORD_STRICT... When entering hebrew text is the word end at from() or at the to() pos? Stephan PS. Ronen, if you want to try it - the patch is attached. /Users/Shared/LyX ~/cvs/lyx /Users/Shared/LyX/lyx-build/LyX-2.0.0svn.build Index: src/Text3.cpp === --- src/Text3.cpp (Revision 37885) +++ src/Text3.cpp (Arbeitskopie) @@ -1890,7 +1890,7 @@ Language const * lang = languages.getLanguage(to_utf8(cmd.argument())); if (!lang) break; - selectWordWhenUnderCursor(cur, WHOLE_WORD); + selectWordWhenUnderCursor(cur, WHOLE_WORD_STRICT); Font font(ignore_font, lang); toggleAndShow(cur, this, font); break;