CTRL+D, when text is selected, adds extra newline

Bug #1159110 reported by Filipe Manuel Azinhal Funenga
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
Medium
Mario Guerriero

Bug Description

I was looking at the shortcuts available in scratch and found, IMO, a "strange" behaviour in the duplicate shortcut (CTRL+D)

Inside the method action_duplicate, when CTRL+D is pressed and some text is selected, the following instruction occurs:

    if (selected != "") buf.insert (ref end, "\n" + selected, -1);

For me (comparing to the behaviour in Geany), this is not good. Imagine you want to duplicate something in the middle of a line. This is what happens

    "I want to duplicate [this] text"

becomes

    "I want to duplicate [this
this] text"

what I'm used happening in Geany is:

    "I want to duplicate [thisthis] text"

If everyone in the scratch project feels like this is a bug, its just a matter of deleting the '\n' in the "buf.insert(...)" instruction of method "action_duplicate" in the "MainWindow.vala" file.

Changed in scratch:
status: New → Confirmed
milestone: none → 2.0
importance: Undecided → Medium
assignee: nobody → Mario Guerriero (mefrio-g)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.