Skip to content

Commit

Permalink
Fix win_cmd_encoding close wuub#21
Browse files Browse the repository at this point in the history
  • Loading branch information
wuub committed Mar 2, 2012
1 parent 33533c5 commit 8c27707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion SublimeREPL.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"win_cmd_encoding": "cp1250",
"default_extend_env": {},
"presistent_history_enabled": true
}
7 changes: 3 additions & 4 deletions sublimerepl.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ def _delete_repl(view):
def subst_for_translate(window):
""" Return all available substitutions"""
import os.path
import locale
res = {
"packages": sublime.packages_path(),
"installed_packages" : sublime.installed_packages_path()
}
if sublime.platform() == "windows":
res["win_cmd_encoding"] = locale.getdefaultlocale()[1]
av = window.active_view()
if av is None:
return res
Expand All @@ -55,10 +58,6 @@ def subst_for_translate(window):
res["file"] = filename
res["file_path"] = os.path.dirname(filename)
res["file_basename"] = os.path.basename(filename)

settings = sublime.load_settings(SETTINGS_FILE)
for key in ["win_cmd_encoding"]:
res[key] = settings.get(key)
return res


Expand Down

0 comments on commit 8c27707

Please sign in to comment.