1
0
Prechádzať zdrojové kódy

Merge pull request #724 from srikumarks/master

BUGFIX: Inspecting a string in Helios breaks into the debugger.
Nicolas Petton 11 rokov pred
rodič
commit
8958d0d218
2 zmenil súbory, kde vykonal 10 pridanie a 3 odobranie
  1. 9 2
      js/Helios-Core.js
  2. 1 1
      st/Helios-Core.st

+ 9 - 2
js/Helios-Core.js

@@ -2462,12 +2462,19 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.HLListWidget.superclass.fn.prototype._refresh.apply(_st(self), []);
+$1=self._selectedItem();
+$ctx1.sendIdx["selectedItem"]=1;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
+} else {
 self._ensureVisible_(self._findListItemFor_(self._selectedItem()));
+};
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLListWidget)})},
 args: [],
-source: "refresh\x0a\x09super refresh.\x0a\x09self ensureVisible: (self findListItemFor: self selectedItem)",
-messageSends: ["refresh", "ensureVisible:", "findListItemFor:", "selectedItem"],
+source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
+messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"],
 referencedClasses: []
 }),
 smalltalk.HLListWidget);

+ 1 - 1
st/Helios-Core.st

@@ -836,7 +836,7 @@ focus
 
 refresh
 	super refresh.
-	self ensureVisible: (self findListItemFor: self selectedItem)
+	self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].
 !
 
 selectItem: anObject