[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-15 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=381080

--- Comment #9 from Dominik Haumann  ---
*** Bug 365642 has been marked as a duplicate of this bug. ***

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-15 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=381080

Dominik Haumann  changed:

   What|Removed |Added

 CC||kdeb...@toeai.com

--- Comment #8 from Dominik Haumann  ---
*** Bug 386512 has been marked as a duplicate of this bug. ***

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-15 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=381080

Dominik Haumann  changed:

   What|Removed |Added

 CC||samj...@gmail.com

--- Comment #7 from Dominik Haumann  ---
*** Bug 394545 has been marked as a duplicate of this bug. ***

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-14 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=381080

Dominik Haumann  changed:

   What|Removed |Added

   Version Fixed In||5.50
  Latest Commit||https://commits.kde.org/kte
   ||xteditor/c90064799dfb9afa7e
   ||5da20eb15856f486a171a3
 Status|CONFIRMED   |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Dominik Haumann  ---
Fixed for KDE Frameworks 5.50.
- https://phabricator.kde.org/D14847
- https://phabricator.kde.org/R39:c90064799dfb9afa7e5da20eb15856f486a171a3
- https://commits.kde.org/ktexteditor/c90064799dfb9afa7e5da20eb15856f486a171a3

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-14 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=381080

Nate Graham  changed:

   What|Removed |Added

  Latest Commit|https://commits.kde.org/kte |https://cgit.kde.org/ktexte
   |xteditor/c90064799dfb9afa7e |ditor.git/commit/?id=c90064
   |5da20eb15856f486a171a3  |799dfb9afa7e5da20eb15856f48
   ||6a171a3
 CC||n...@kde.org

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-14 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=381080

Dominik Haumann  changed:

   What|Removed |Added

  Latest Commit|https://cgit.kde.org/ktexte |https://commits.kde.org/kte
   |ditor.git/commit/?id=c90064 |xteditor/c90064799dfb9afa7e
   |799dfb9afa7e5da20eb15856f48 |5da20eb15856f486a171a3
   |6a171a3 |

--- Comment #6 from Dominik Haumann  ---
Git commit c90064799dfb9afa7e5da20eb15856f486a171a3 by Dominik Haumann.
Committed on 14/08/2018 at 16:24.
Pushed by dhaumann into branch 'master'.

Fix crash when replacing \n around empty lines

Summary:
The problem is that QString("").startsWith("") returns false.
Similarly, QString("").endsWith("") also returns false.
However, the code previously was assuming that both cases return true.

This is now fixed, and verified through unit tests.

This deprecates patch D6473

Test Plan: make && make test

Reviewers: jsalatas, ltoscano, kfunk, cullmann, anthonyfieroni, mwolff

Reviewed By: cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D14847

M  +40   -1autotests/src/searchbar_test.cpp
M  +3-0autotests/src/searchbar_test.h
M  +7-2src/search/kateplaintextsearch.cpp

https://commits.kde.org/ktexteditor/c90064799dfb9afa7e5da20eb15856f486a171a3

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2018-08-14 Thread Dominik Haumann
https://bugs.kde.org/show_bug.cgi?id=381080

Dominik Haumann  changed:

   What|Removed |Added

 Status|UNCONFIRMED |CONFIRMED
 Ever confirmed|0   |1

--- Comment #4 from Dominik Haumann  ---
Confirmed, with an empty line at the end of the document.

Backtrace:
Thread 1 (Thread 0x7fc97eaec980 (LWP 8039)):
[KCrash Handler]
#9  0x7fc978deb7d9 in qt_assert(char const*, char const*, int) () from
/usr/lib64/libQt5Core.so.5
#10 0x7fc97e4843a4 in KateViewInternal::cursorUp (this=0x11ca5f0,
sel=false) at
/home/dh/kde/kf5/src/frameworks/ktexteditor/src/view/kateviewinternal.cpp:1587
#11 0x7fc97e47644a in KTextEditor::ViewPrivate::up (this=0xc3e1f0) at
/home/dh/kde/kf5/src/frameworks/ktexteditor/src/view/kateview.cpp:2846

Indeed, the cursor is at an invalid text position.

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2017-07-11 Thread Simon Andric
https://bugs.kde.org/show_bug.cgi?id=381080

Simon Andric  changed:

   What|Removed |Added

 CC||simonandr...@gmail.com

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2017-07-03 Thread John Salatas
https://bugs.kde.org/show_bug.cgi?id=381080

--- Comment #3 from John Salatas  ---
Just created a patch review which tries to fix it 

https://phabricator.kde.org/D6473

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2017-06-19 Thread John Salatas
https://bugs.kde.org/show_bug.cgi?id=381080

--- Comment #2 from John Salatas  ---
(In reply to Christoph Feck from comment #1)
> I could reproduce with 'kwrite' but not with 'kate'.
> 
> After closing the replace bar using Esc, the statusbar still says 'Line 5',
> despite the cursor forcefully being moved to line 1 (the only line remaining
> after the replace).

It still happens to me. Please notice the following:

1) if mode is in "regular expression" it works ok (aka no crash). The crash
happens only in "Escape Sequences" mode.
2) the crash happens when there at least on empty line in the end of the
document. So (visualizing new line characters)
a\n
b\n
c\n
d\n
crashes

a\n
b\n
c\n
d
doesn't crash

I confirm that it also happens in kwrite as well.

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

[kate] [Bug 381080] Crash when replacing new lines with spaces

2017-06-19 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=381080

--- Comment #1 from Christoph Feck  ---
I could reproduce with 'kwrite' but not with 'kate'.

After closing the replace bar using Esc, the statusbar still says 'Line 5',
despite the cursor forcefully being moved to line 1 (the only line remaining
after the replace).

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