File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 4
4
^^^^^
5
5
6
6
* fixed console plots when xlwings 0 .31 .4 + is installed (closes :editor_issue:` 278` ).
7
+
8
+ * fixed some inplace modifications on arrays done via in the console not refreshing
9
+ the displayed array automatically and / or not adding a ` *` to the window title
10
+ to inform the session is modified (closes :editor_issue:` 22` and :editor_issue:` 280` ).
Original file line number Diff line number Diff line change 77
77
REOPEN_LAST_FILE = object ()
78
78
79
79
assignment_pattern = re .compile (r'[^\[\]]+[^=]=[^=].+' )
80
- setitem_pattern = re .compile (r'(\w+)(\.i|\.iflat|\.points|\.ipoints)?\[.+\][^=]=[^=].+' )
80
+ setitem_pattern = re .compile (r'(\w+)(\.i|\.iflat|\.points|\.ipoints)?\[.+\][^=]* =[^=].+' )
81
81
history_vars_pattern = re .compile (r'_i?\d+' )
82
82
# XXX: add all scalars except strings (from numpy or plain Python)?
83
83
# (long) strings are not handled correctly so should NOT be in this list
@@ -699,9 +699,13 @@ def ipython_cell_executed(self):
699
699
setitem_match = setitem_pattern .match (last_input )
700
700
if setitem_match :
701
701
varname = setitem_match .group (1 )
702
- # otherwise it should have failed at this point, but let us be sure
702
+ # setitem to (i)python special variables do not concern us
703
703
if varname in clean_ns :
704
704
if self ._display_in_grid (varname , clean_ns [varname ]):
705
+ # For better or worse, _save_data() only saves "displayable data"
706
+ # so changes to variables we cannot display do not concern us,
707
+ # and this line should not be moved outside the if condition.
708
+ self .unsaved_modifications = True
705
709
# XXX: this completely refreshes the array, including detecting scientific & ndigits, which might
706
710
# not be what we want in this case
707
711
self .select_list_item (varname )
You can’t perform that action at this time.
0 commit comments