Ubuntu

Snippet plugin doesn't work properly when having a placeholder with default list values

Reported by Răzvan-Cosmin Rădulescu on 2012-04-05
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Low
Unassigned

Bug Description

1)
Description: Ubuntu 11.10
Release: 11.10

2)
gedit 3.2.3-0ubuntu0.1

3)
went to Tools > Manage Snippets... then FORTRAN 95 and changed character (c) from:

character(len=${1:10}) :: $0
to
character(len=${1:[*,10]}) :: $0

Expectation: insert text, place cursor in $1 placeholder position and give default values list to choose from

4)
What happened:
inserted "character (len= ) :: " with cursor in $1 placeholder position but no default values appeared.

Terminal:
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 751, in on_view_key_press
    return self.run_snippet()
  File "/usr/lib/gedit/plugins/snippets/document.py", line 598, in run_snippet
    if not self.run_snippet_trigger(word, (start, end)):
  File "/usr/lib/gedit/plugins/snippets/document.py", line 572, in run_snippet_trigger
    return self.apply_snippet(snippets[0], bounds[0], bounds[1])
  File "/usr/lib/gedit/plugins/snippets/document.py", line 503, in apply_snippet
    self.goto_placeholder(self.active_placeholder, sn.placeholders[keys[0]])
  File "/usr/lib/gedit/plugins/snippets/document.py", line 287, in goto_placeholder
    self.defaults_provider.set_defaults(next.defaults)
  File "/usr/lib/gedit/plugins/snippets/completion.py", line 169, in set_defaults
    self.proposals.append(GtkSource.CompletionItem(d))
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gedit 3.2.3-0ubuntu0.1
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic 3.0.13
Uname: Linux 3.0.0-15-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Thu Apr 5 22:46:24 2012
ExecutablePath: /usr/bin/gedit
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)

This has been fixed upstream

Sebastien Bacher (seb128) wrote :

thanks Jesse

Changed in gedit (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Sebastien Bacher (seb128) wrote :

that's this commit right? 1035688

Hi all,
I am afraid this bug is still (partially) present in gedit 3.8.3 (Ubuntu 13.10).

A snippet with a simple placeholderlike:
${1:[aaa,bbb,ccc]}

only prints the first default value of the list (here: aaa).
No popup showing all default values (here aaa and bbb and ccc) as a list is displayed.

Cheers,

Yves

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers