Skip to content

Commit 98e02c1

Browse files
author
Micah Carrick
committed
Issue #7 - Replaced g_file_get_uri() with g_file_get_parse_name() for unicode support in calls to ctags.
1 parent c3973f6 commit 98e02c1

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

README.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Gedit Source Code Browser
44
A source code class and function browser plugin for Gedit 3.
55

66
* Author: Micah Carrick
7-
* Version: 3.0.2
87

98
This plugin will add a new tab to the side pane in the Gedit text editor which
109
shows symbols (functions, classes, variables, etc.) for the active document.
@@ -65,6 +64,11 @@ Screenshots
6564
Changes
6665
-------
6766

67+
**Vesion 3.0.3**
68+
69+
* Issue #7 - Replaced g_file_get_uri() with g_file_get_parse_name() for unicode
70+
support in calls to ctags.
71+
6872
**Vesion 3.0.2**
6973

7074
* Checks if image exists before trying to instantiate GdkPixbuf

sourcecodebrowser.plugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Description=A source code class and function browser for Gedit 3.
77
Authors=Micah Carrick <[email protected]>
88
Copyright=Copyright © 2011 Micah Carrick
99
Website=https://github.com/Quixotix/gedit-source-code-browser
10-
Version=3.0.2
10+
Version=3.0.3

sourcecodebrowser/ctags.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def parse(self, command, executable=None):
8585
Parse ctags tags from the output of a ctags command. For example:
8686
ctags -n --fields=fiKmnsSzt -f - some_file.php
8787
"""
88-
args = [arg.replace('%20', ' ') for arg in shlex.split(command)]
88+
#args = [arg.replace('%20', ' ') for arg in shlex.split(command)]
89+
args = shlex.split(command)
8990
p = subprocess.Popen(args, 0, shell=False, stdout=subprocess.PIPE, executable=executable)
9091
symbols = self._parse_text(p.communicate()[0])
9192

sourcecodebrowser/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ def _load_active_document_symbols(self):
389389
self._log.debug("Loading %s...", uri)
390390
if uri is not None:
391391
if uri[:7] == "file://":
392-
filename = uri[7:]
392+
# use get_parse_name() to get path in UTF-8
393+
filename = location.get_parse_name()
393394
self._sourcetree.parse_file(filename, uri)
394395
elif self.load_remote_files:
395396
basename = location.get_basename()

0 commit comments

Comments
 (0)