Skip to content

Commit

Permalink
hide error info
Browse files Browse the repository at this point in the history
  • Loading branch information
D0n9X1n committed Oct 7, 2019
1 parent 8317f83 commit 025054f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pythonx/quickrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@
import platform
import vim


def letVimRunCommand(command):
try:
vim.command(command);
except (KeyboardInterrupt, Exception):
# do nothing
return;

def findConfigFile(configFileName):
currentPath = os.getcwd();
configFilePath = os.path.join(currentPath, configFileName);

if (os.path.exists(configFilePath)):
vim.command("let g:hasConfigFile = 1")
letVimRunCommand("let g:hasConfigFile = 1")
else:
vim.command("let g:hasConfigFile = 0")

letVimRunCommand("let g:hasConfigFile = 0")

def runWithConfigFile(configFileName):
currentPath = os.getcwd();
Expand All @@ -27,5 +34,4 @@ def runWithConfigFile(configFileName):
command = "!" + reader.read();
reader.close();

vim.command(command);

letVimRunCommand(command)

0 comments on commit 025054f

Please sign in to comment.