Bug 106261 - Static word wrap cuts words in the middle / misplaces cursor
Summary: Static word wrap cuts words in the middle / misplaces cursor
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 139052 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-25 11:56 UTC by gero
Modified: 2011-01-07 11:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gero 2005-05-25 11:56:45 UTC
Version:           1.7.1 (using KDE KDE 3.4.0)
Installed from:    Unspecified Linux
OS:                Linux

- Turn on Settings -> Configure Editor -> Editing -> Enable static word wrap.
- Move cursor before the space in front of the last word in a line.
- Type until last word is wrapped to next line.
=> Result: Currently typed word is cut off, cursor is moved to beginning of next line.
* Expected result: Cursor should stay in the current (first) line.

Example (cursor marked by asterisk *):

This is the first line * and
this the second.

(just typing the work "mutilated" results in)

This is the first line muti
lated*and this the second.
Comment 1 Thomas Braun 2006-01-18 18:16:23 UTC
I've tried to reproduce it with KDE 3.5 and kile 1.9b2 but without luck.
It sounds also more like a katepart bug.

Do you still experience this bug ?

Thanks
Thomas Braun
Comment 2 gero 2006-01-19 23:31:25 UTC
I'm still on the same version. Unfortunatly, I cannot update currently.
I was unable to find any similar bug filed for kate-part.

BTW, this is Ubuntu Hoary.

Cheers,
gero.
Comment 3 Vdovin Evgenii 2006-01-25 09:49:22 UTC
If I type in English, everything is o'k. But when I use my native language (russian) the problems is precisely like it is described above. 
Comment 4 Ronaldo Reis Júnior 2006-01-31 17:12:03 UTC
I'm using kile 1.8.1 and I have the similar problem.

I use static word wrap because is more simple to debug and to use with CVS, but some problems with wrong word wrap difficult the work.

Some line dont must be wrap.

Example.

\inclugraphics[width=\linewidth,angle=90]{Mypictures/figure39.png}

Kile was wrap this line wrong:

\inclugraphics[width=\linewidth,angle=90]{
Mypictures/figure39.png}

In this way, latex give-me an error. The correct behaviour is dont static wrap line without spaces. In this case, make only dinamic word wrap.

Thanks
Ronaldo
Comment 5 Thomas Braun 2006-02-02 20:08:40 UTC
Hello,

concerning https://bugs.kde.org/show_bug.cgi?id=106261#c3
what version of KDE are you talking about ?
Is it easy to typeset some russian ?
If yes I can have try to reproduce it.

concerning https://bugs.kde.org/show_bug.cgi?id=106261#c4
Despite the spell error in your includegraphics, are we talking about the space after the opening curly bracket which leads to the error?
I have here, tetex 3.0 backport for sarge, no error. Latex just can't read my picture and so doesn't give one in KDVI, which is of course also not the thing we want.

We will have a look what we can do for kile 1.9

Thanks
Thomas Braun
Comment 6 Vdovin Evgenii 2006-02-07 10:00:16 UTC
My version of KDE is 3.5.

It is not difficult to type russian, if you use xkbd, for example, you can just add russian keyboard, the following lines in xorg.conf (config file of X11 section)
Section "InputDevice"
	Identifier "Keyboard0"
	Driver	"keyboard"
	Option	"Protocol"	"Standard"
	Option	"XkbModel"	"pc104"
	Option	"XkbLayout"	"us,ru(winkeys)"
	Option	"XkbOptions"	"grp:ctrl_shift_toggle,grp_led:scroll"
EndSection

By some reason I use cp1251 encoding but this does not matter, since the problem exists in any encoding.
Comment 7 Vdovin Evgenii 2006-02-09 06:12:08 UTC
I've meat this problem also in English text:

before:
"$\vert\zeta\vert=t$,  denote by $\tau$ a graph (possibly trivial) automorph $A$,
then $\vert\tau\vert=2$, and" 

after typing "ism":
"$\vert\zeta\vert=t$,  denote by $\tau$ a graph (possibly trivial) automorphi
sm$A$, then $\vert\tau\vert=2$, and"

Note that you should type the text "before" without pressing "Enter", i.e. you should type something like 

"$\vert\zeta\vert=t$,  denote by $\tau$ $A$, then $\vert\tau\vert=2$, and"

then put the cursor after $tau$ and continue typing. Such difficult procedure is necessary, since in other case you'll not see this problem.

Comment 8 gero 2006-02-09 21:02:18 UTC
Comment #7 describes exactly the same bug I've described in comment #1. Thanks Vdovin!

Thomas, could you promote this bug to NEW?

Cheers,
gero.
Comment 9 Thomas Braun 2006-02-13 21:44:42 UTC
Hello together,
(@ kwrite devs, only comment 4 deals with kile, the rest belongs to katepart.
Thanks :) )

comment 4:

We have investigated the problem and found out, that it is an somehow unique 
behaviour (error ?) to the includegraphics command that it doesn't accept \n 
in its mandatory argument. Nearly all other commands accept \n, eg.
\section{
introduction}
\usepackage[T1]{
fontenc}
So if we don't do line wrap after {,[ we make the general behaviour worse.
We also can't have regexps to decide where to do linewraps (this is a katepart 
limitation).

As a workaround, you can add a % after { then latex compiles fine.

rest:

I can reproduce it in english. This seems no problem of the language, so I 
haven't yet tried to type russian. Nevertheless thanks for the explanation.
We will forward the bug to the kwrite devs.
Comment 10 Vdovin Evgenii 2006-02-17 12:11:59 UTC
Thomas, could you give here some comments (or give a reference) if the problem will be solved?
Comment 11 Willi Richert 2006-03-23 10:46:47 UTC
Unfortunately, I have the same error:

Given the line between === as in one line:
===
reinforcement learning or planning algorithms, that depend on encapsul actions.
===

If I change "encapsul" to "encapsulated" I get the following:
===
reinforcement learning or planning algorithms, that depend on encapsulat <newline>
ed actions.
===


KDE Version  1.9b2 (KDE 3.5.1-2.4.fc3.kde, Fedora Core release 3 (Heidelberg))
Operating System  Linux (i686) release 2.6.12-1.1381_FC3
Compiler  gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
Comment 12 Vdovin Evgenii 2006-10-17 12:23:56 UTC
I would like to ask, why the status of this bug is "UNCONFIRMED"? And another question, does somebody try to solve this bug? I think, that it is very important.
Comment 13 gero 2007-02-05 23:05:40 UTC
Can someone please promote this bug to NEW?
Comment 14 gero 2007-07-20 22:51:07 UTC
The bug still persists in Kate 2.5.4 (KDE 3.5.4).

Again, can someone please promote this bug to NEW?
Comment 15 Thomas Friedrichsmeier 2007-12-10 22:05:17 UTC
SVN commit 747031 by tfry:

When applying static wrap, remove the trailing space in the last step.
This is sort of awkward, but fixes:
BUG: 106261

 M  +13 -2     katedocument.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=747031
Comment 16 Thomas Friedrichsmeier 2007-12-11 16:37:24 UTC
*** Bug 139052 has been marked as a duplicate of this bug. ***
Comment 17 gero 2008-09-24 18:57:10 UTC
Sorry, this bug persists in Kate 2.5.9 (KDE 3.5.9).
Comment 18 Andreas Pakulat 2008-09-25 08:38:55 UTC
right, but its fixed in Kate 3 which is available with KDE4.
Comment 19 gero 2011-01-07 11:06:20 UTC
Right, kind of. It's been replaced by bug 168534 (comment #12). We're getting there. Thanks.