Re: [gedit-list] External-tools plugin requires trailing newline to replace selection



Hi Hugh,

    yes, sounds like a bug... probably we are processing output line by line.

Please file it in bugzilla so it does not get lost.


Ciao
    Paolo



On Fri, May 31, 2013 at 9:43 PM, Hugh <hugh salsacardiff com> wrote:
Sometimes (often) when using a script in the External-tools plugin I want to replace the selection without an extra trailing newline, bit I don't think its possible.

For instance, I think the following script should leave the selected text as it finds it, but instead, the selection is deleted.

-----------------------------------
#!/bin/sh
# [Gedit Tool]
# Input=nothing
# Output=replace-selection
# Name=Test
# Applicability=all
# Save-files=nothing

printf "%s" "$GEDIT_SELECTED_TEXT"
-----------------------------------

If a newline is added to the printf (printf "%s\n"), the selection is replaced, but the unwanted newline is added.


Does this qualify as a bug? (Gedit 3.6.1 on Debian)

Regards

Hugh
_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]