After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 614140 - Snippets: shortcut keys don't work
Snippets: shortcut keys don't work
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-27 23:54 UTC by Jean-Philippe Fleury
Modified: 2019-03-23 20:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean-Philippe Fleury 2010-03-27 23:54:15 UTC
Since I updated to gedit 2.29.9, shortcut keys don't work for Snippets, but still work for External Tools. To reproduce the bug:

1) Make sure Snippets are enabled in "Edit > Preferences > Plugins", and go to manage them in "Edit > Preferences > Plugins > Snippets > Configure Plugin".

2) Create a global snippet, named for example "comment":

/* $1 */$0

and create a shortcut key:

Control+n

The "Shortcut key" field is filled with "Ctrl+N". Note: in External Tools, the shortcut key is saved as "<Control>n" (more details below).

3) In gedit, create a new file and do the shortcut key.

Actual result: nothing.

Expected result: the snippet "comment" should be expanded.

Here's a comparison with the plugin External Tools:

1) Make sure External Tools are enabled in "Edit > Preferences > Plugins", and go to manage them in "Edit > Preferences > Plugins > External Tools > Configure Plugin".

2) Create a tool, named for example "copy-name":

#!/bin/sh
echo -n "$GEDIT_CURRENT_DOCUMENT_NAME" | xsel -b -i

and create a shortcut key:

Control+n

The "Shortcut key" field is filled with "<Control>n".

3) In gedit, open a file and do the shortcut key.

Actual result: the tool is run.
Comment 1 jessevdk@gmail.com 2010-03-28 22:59:25 UTC
Luckily we got permission to break hard freeze to fix this bug, just in time for 2.30. The problem was twofold, the snippets were not properly initialized for the first empty document, and the result from the activation was not properly propagated back such that other handlers could still run. This should now be fixed.