https://bugs.kde.org/show_bug.cgi?id=465841

--- Comment #8 from Oded Arbel <o...@geek.co.il> ---
(In reply to Waqar Ahmed from comment #7)
> The problem is that the file you linked contains way too many trailing
> spaces in each line (2000+ sometimes). So, if you want to keep the spaces
> setting enabled, a good local fix would be to just rtrim

Its not actually "trailing" spaces - the format is ASCII tabular format with
lines starting and ending with a pipe character. naively rtriming it will not
help - but thanks for pointing out a simple workaround.

Generally, I'm less interested in workarounds (though the point about painting
white spaces causing the issue did indeed help) and more in pointing at issues
that may hinder KDE adoption :-)

> This can be optimized in theory as the width of a space is constant. We can
> just use that to quickly paint all the spaces. Problem is that dynamic word
> wrapping makes things a bit trickier.

Interestingly (or not - you decide), the word wrapping behavior of lines - such
as in this example - where there's a few dozen text characters at the
beginning, followed by thousands of spaces and a terminating non-white-space
character - is that the line after the last wrap of actual text contains almost
all the spaces remaining on the line, even though it exceeds the width of the
window it doesn't wrap and there is no horizontal scrollbar (the additional
spaces are inaccessible), then another dynamic wrap and the last 110 characters
of the line (which includes 109 spaces and a terminating pipe). This 110
character width is consistent across all the lines in the file, regardless of
how many dynamic wraps each line has. The spaces in the beginning of the white
space span, before the last dynamic wrap, can't be selected using either
keyboard or mouse. Looks really weird, but also ... intentional?

> For part 2 => slow paste, I think this is because of "Indent on Paste". Do
> you have it enabled? Your profile data shows that it is enabled, but maybe
> its something else.

That is correct. Disabling "Adjust indentation of code pasted from the
clipboard" solves the "freeze on paste" issue.

> I am not sure why indent on paste is getting executed on
> a `.log` file in the first place as it doesn't have an indenter.

Well - its not a log file when I paste it: I just open a new Kate buffer and
paste some ASCII into - it has no way of knowing that I intend it to be a
"log". I tried to set the syntax mode to "log (simplified)" (in the bottom
right corner select box) but that didn't help as pasting still auto-indented
the lines. Not that I understand why it indents the lines to begin with - all
the lines start with the same character ("|") and end with the same character
("|").

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to