Skip to content

Commit 675e7d8

Browse files
committed
Merge branch 'development'
2 parents e3ffb95 + bb892d0 commit 675e7d8

File tree

5 files changed

+54
-7
lines changed

5 files changed

+54
-7
lines changed

Side Bar Mount Point.sublime-menu

-3
This file was deleted.

Side Bar.sublime-menu

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[
2+
{
3+
"caption": "CTags: Rebuild Tags",
4+
"command": "rebuild_tags",
5+
"args": {
6+
"dirs": [],
7+
"files": []
8+
}
9+
},
10+
{ "caption": "-", "id": "ctags_commands" }
11+
]

ctagsplugin.py

+19-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import functools
66
import codecs
7+
import locale
78
import os
89
import pprint
910
import re
@@ -277,7 +278,12 @@ def get_alternate_tags_paths(view, tags_file):
277278
os.path.normpath(
278279
os.path.join(folder, extrafile)))
279280

280-
return set(p for p in search_paths if p and os.path.exists(p))
281+
# use list instead of set for keep order
282+
ret = []
283+
for p in search_paths:
284+
if p and (p not in ret) and os.path.exists(p):
285+
ret.append(p)
286+
return ret
281287

282288

283289
def get_common_ancestor_folder(path, folders):
@@ -571,6 +577,10 @@ def show_tag_panel(view, result, jump_directly):
571577
def on_select(i):
572578
if i != -1:
573579
JumpPrev.append(view)
580+
# Work around bug in ST3 where the quick panel keeps focus after
581+
# selecting an entry.
582+
# See https://github.com/SublimeText/Issues/issues/39
583+
view.window().run_command('hide_overlay')
574584
scroll_to_tag(view, args[i])
575585

576586
if jump_directly and len(args) == 1:
@@ -829,9 +839,14 @@ def run(self, edit, **args):
829839
opts = setting('opts')
830840
tag_file = setting('tag_file')
831841

832-
if 'dirs' in args:
842+
if 'dirs' in args and args['dirs']:
833843
paths.extend(args['dirs'])
834844
self.build_ctags(paths, command, tag_file, recursive, opts)
845+
elif 'files' in args and args['files']:
846+
paths.extend(args['files'])
847+
# build ctags and ignore recursive flag - we clearly only want
848+
# to build them for a file
849+
self.build_ctags(paths, command, tag_file, False, opts)
835850
elif (self.view.file_name() is None and
836851
len(self.view.window().folders()) <= 0):
837852
status_message('Cannot build CTags: No file or folder open.')
@@ -881,7 +896,8 @@ def tags_built(tag_file):
881896
str_err = ' '.join(
882897
e.output.decode('windows-1252').splitlines())
883898
else:
884-
str_err = e.output.rstrip()
899+
str_err = e.output.decode(locale.getpreferredencoding()).rstrip()
900+
885901
error_message(str_err)
886902
return
887903
except Exception as e:

messages.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"0.3.4": "messages/0.3.4.md",
88
"0.3.5": "messages/0.3.5.md",
99
"0.3.6": "messages/0.3.6.md",
10-
"0.3.7": "messages/0.3.7.md"
10+
"0.3.7": "messages/0.3.7.md",
11+
"0.3.8": "messages/0.3.8.md"
1112
}

messages/0.3.8.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Changes in 0.3.8
2+
================
3+
4+
- Add build ctags options to sidebar
5+
- Bug Fixes
6+
7+
Fixes
8+
=====
9+
10+
* Need to keep the tag path order , #227
11+
12+
Resolves
13+
========
14+
15+
* keep the search order, #239
16+
* Correctly decode error messages on *nix systems., #232
17+
* fix cursor after open_file, #231
18+
19+
*******************************************************************************
20+
21+
For more detailed information about these changes, run ``git v0.3.7..v0.3.8``
22+
on the Git repository found [here](https://github.com/SublimeText/CTags).

0 commit comments

Comments
 (0)