A new feature was introduced in bug 286262. When you select multiple lines and press the delete line(s) shortcut, all selected lines are deleted. This new feature introduces a new bug: Reproducible: Always Steps to Reproduce: 1. open a multi line text file in kate 2. select the last chars of the file 3. press the delete line shortcut Actual Results: the complete document is empty Expected Results: ony the lines that are selected are deletet the feature works well if i select multiple or single lines at the front or in the middle of the document. is selected 3.12.60 in the tracker because 3.12.95 version was not available
@Michal: May it be, that we should cache the end line? i.e.: void KateView::killLine( ) { if (m_selection.isEmpty()) { m_doc->removeLine(cursorPosition().line()); } else { m_doc->editStart(); - for (int line = m_selection.end().line(); line >= m_selection.start().line(); line--) { + const int startLine = m_selection.start().line(); + for (int line = m_selection.range.end().line(); line >= startLine; line--) { m_doc->removeLine(line); } m_doc->editEnd(); } }
Git commit af907b0faf9dcccf0e981d4a17eedaed7d414e77 by Christoph Cullmann. Committed on 23/09/2014 at 18:51. Pushed by cullmann into branch 'master'. fix kill line with selection if last line is selected good catch Dominik, the endLine is altered and we delete everything! M +2 -1 src/view/kateview.cpp http://commits.kde.org/ktexteditor/af907b0faf9dcccf0e981d4a17eedaed7d414e77