Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix running unsaved script in console
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+2
−1
python/console/console_editor.py
|
@@ -633,7 +633,8 @@ def syntaxCheck(self, filename=None, fromContextMenu=True): |
|
|
source = source.encode('utf-8') |
|
|
if isinstance(filename, type(u"")): |
|
|
filename = filename.encode('utf-8') |
|
|
compile(source, filename, 'exec') |
|
|
if filename: |
|
|
compile(source, filename, 'exec') |
|
|
except SyntaxError as detail: |
|
|
eline = detail.lineno and detail.lineno or 1 |
|
|
ecolumn = detail.offset and detail.offset or 1 |
|
|