|This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/109623/|
On March 22nd, 2013, 9:47 p.m. UTC, Michel Ludwig wrote:
src/editorextension.cpp (Diff revision 2) bool EditorExtension::findCurrentTexParagraph(int &startline, int &endline, KTextEditor::View *view) bool EditorExtension::findCurrentTexParagraph(int& startline, int& startcolumn, int& endline, int& endcolumn, KTextEditor::View* view) 2361 QString line = doc->line(startline);Why is this necessary? Unless startline == 0, won't startline only contain whitespaces anyway? The same for endline.
On March 22nd, 2013, 9:58 p.m. UTC, Eugene Shalygin wrote:Michel, I do not understand the question, sorry. The idea if this patch is to make selectParagraph() select the text only. Without any spaces and EOLs. After that one can invoke "Join lines". With current selectParagraph(), "Join lines" joins together paragraphs, separated by one empty line.
Ok, that's fine, I missed something. But that piece of code still looks a bit fragile to me. If line == 0 and only contains spaces, it looks like 'startColumn' won't be set at all. Could you change it to 'startColumn = 0' before the loop and then increment 'startColumn' in each iteration (similar to the loop above)?
On March 22nd, 2013, 9:47 p.m. UTC, Michel Ludwig wrote:The 'Join Lines' action from the 'Tools' menu (i.e. also the one that is called from within the scripts) originates from KatePart. Hence, any change to its behaviour will have to be done in KatePart.
On March 22nd, 2013, 9:58 p.m. UTC, Eugene Shalygin wrote:I don't want to change behavior of "Join lines". I want "Select paragraph" which selects _just_ paragraph text. Perhaps, a new function "Select Paragraph text" or "Select paragraph body" would be more appropriate?
Ok, but doesn't the new 'selectParagrah(wholeLines = false)' do exactly that? Basically one could define 'selectParagraphText' simply by calling 'selectParagrah(wholeLines = false)'?
On March 20th, 2013, 10:53 p.m. UTC, Eugene Shalygin wrote:
Review request for Kile and Michel Ludwig.
By Eugene Shalygin.
Updated March 20, 2013, 10:53 p.m.