Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenfin committed May 19, 2014
2 parents e3ffb95 + bb892d0 commit 675e7d8
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 7 deletions.
3 changes: 0 additions & 3 deletions Side Bar Mount Point.sublime-menu

This file was deleted.

11 changes: 11 additions & 0 deletions Side Bar.sublime-menu
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"caption": "CTags: Rebuild Tags",
"command": "rebuild_tags",
"args": {
"dirs": [],
"files": []
}
},
{ "caption": "-", "id": "ctags_commands" }
]
22 changes: 19 additions & 3 deletions ctagsplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import functools
import codecs
import locale
import os
import pprint
import re
Expand Down Expand Up @@ -277,7 +278,12 @@ def get_alternate_tags_paths(view, tags_file):
os.path.normpath(
os.path.join(folder, extrafile)))

return set(p for p in search_paths if p and os.path.exists(p))
# use list instead of set for keep order
ret = []
for p in search_paths:
if p and (p not in ret) and os.path.exists(p):
ret.append(p)
return ret


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

if jump_directly and len(args) == 1:
Expand Down Expand Up @@ -829,9 +839,14 @@ def run(self, edit, **args):
opts = setting('opts')
tag_file = setting('tag_file')

if 'dirs' in args:
if 'dirs' in args and args['dirs']:
paths.extend(args['dirs'])
self.build_ctags(paths, command, tag_file, recursive, opts)
elif 'files' in args and args['files']:
paths.extend(args['files'])
# build ctags and ignore recursive flag - we clearly only want
# to build them for a file
self.build_ctags(paths, command, tag_file, False, opts)
elif (self.view.file_name() is None and
len(self.view.window().folders()) <= 0):
status_message('Cannot build CTags: No file or folder open.')
Expand Down Expand Up @@ -881,7 +896,8 @@ def tags_built(tag_file):
str_err = ' '.join(
e.output.decode('windows-1252').splitlines())
else:
str_err = e.output.rstrip()
str_err = e.output.decode(locale.getpreferredencoding()).rstrip()

error_message(str_err)
return
except Exception as e:
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"0.3.4": "messages/0.3.4.md",
"0.3.5": "messages/0.3.5.md",
"0.3.6": "messages/0.3.6.md",
"0.3.7": "messages/0.3.7.md"
"0.3.7": "messages/0.3.7.md",
"0.3.8": "messages/0.3.8.md"
}
22 changes: 22 additions & 0 deletions messages/0.3.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Changes in 0.3.8
================

- Add build ctags options to sidebar
- Bug Fixes

Fixes
=====

* Need to keep the tag path order , #227

Resolves
========

* keep the search order, #239
* Correctly decode error messages on *nix systems., #232
* fix cursor after open_file, #231

*******************************************************************************

For more detailed information about these changes, run ``git v0.3.7..v0.3.8``
on the Git repository found [here](https://github.com/SublimeText/CTags).

0 comments on commit 675e7d8

Please sign in to comment.