Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

settings: don't remember empty string in history

Empty string is troublesome rather than useful.

Changeset 797b7714ed1a

Parent 2be3c87633cb

by Yuya Nishihara

Changes to one file · Browse files at 797b7714ed1a Showing diff from parent 2be3c87633cb Diff from another changeset...

 
40
41
42
43
 
44
45
46
 
71
72
73
 
 
74
75
76
 
93
94
95
96
 
97
98
99
 
40
41
42
 
43
44
45
46
 
71
72
73
74
75
76
77
78
 
95
96
97
 
98
99
100
101
@@ -40,7 +40,7 @@
  else:   settings = opts['settings']   slist = settings.value('settings/'+opts['cpath']).toStringList() - self.previous = [s for s in slist] + self.previous = [s for s in slist if s]   self.setDisabled(opts['readonly'])     def resetList(self): @@ -71,6 +71,8 @@
  elif self.curvalue:   self.addItem(ucur)   self.setCurrentIndex(self.count()-1) + else: # empty string + self.setEditText(ucur)     def showPopup(self):   if self.opts.get('defer') and not self.loaded: @@ -93,7 +95,7 @@
  utext = self.currentText()   if utext == _unspecstr:   return None - if 'nohist' in self.opts or utext in self.defaults + self.previous: + if 'nohist' in self.opts or utext in self.defaults + self.previous or not utext:   return hglib.fromunicode(utext)   self.previous.insert(0, utext)   self.previous = self.previous[:10]