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

Bug #974682 reported by Răzvan-Cosmin Rădulescu on 2012-04-05
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)

Bug Description

Description: Ubuntu 11.10
Release: 11.10

gedit 3.2.3-0ubuntu0.1

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

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

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

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

Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/", line 751, in on_view_key_press
    return self.run_snippet()
  File "/usr/lib/gedit/plugins/snippets/", line 598, in run_snippet
    if not self.run_snippet_trigger(word, (start, end)):
  File "/usr/lib/gedit/plugins/snippets/", line 572, in run_snippet_trigger
    return self.apply_snippet(snippets[0], bounds[0], bounds[1])
  File "/usr/lib/gedit/plugins/snippets/", line 503, in apply_snippet
    self.goto_placeholder(self.active_placeholder, sn.placeholders[keys[0]])
  File "/usr/lib/gedit/plugins/snippets/", line 287, in goto_placeholder
  File "/usr/lib/gedit/plugins/snippets/", line 169, in set_defaults
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:

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.



dino99 (9d9) wrote :

This version has expired

Changed in gedit (Ubuntu):
status: Fix Committed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers