Mercurial > cgi-bin > hgweb.cgi > ClipMan
comparison src/name/blackcap/clipman/PasteboardQueue.kt @ 31:0c6c18a733b7
Compiles, new menu still a mess.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 30 Jan 2020 16:01:51 -0800 |
parents | 0e88c6bed11e |
children | c803a2c89ea0 |
comparison
equal
deleted
inserted
replaced
30:0e88c6bed11e | 31:0c6c18a733b7 |
---|---|
108 val text = doc.getText(0, doc.length) | 108 val text = doc.getText(0, doc.length) |
109 pos = if (norigin.inItem >= 0) norigin.inItem else text.length - 1 | 109 pos = if (norigin.inItem >= 0) norigin.inItem else text.length - 1 |
110 pos = search(needle, text, pos) | 110 pos = search(needle, text, pos) |
111 if (pos >= 0) { | 111 if (pos >= 0) { |
112 si.highlighter.addHighlight(pos, pos+needle.length, painter) | 112 si.highlighter.addHighlight(pos, pos+needle.length, painter) |
113 si.scrollRectToVisible(si.getBounds(null)) | |
113 break | 114 break |
114 } | 115 } |
115 norigin = Offset(norigin.inQueue + incr, start) | 116 norigin = Offset(norigin.inQueue + incr, start) |
116 } | 117 } |
117 return if (pos >= 0) Offset(norigin.inQueue, pos) else null | 118 return if (pos >= 0) Offset(norigin.inQueue, pos) else null |
148 var dirty = false | 149 var dirty = false |
149 while (size > _maxSize) { | 150 while (size > _maxSize) { |
150 var extra = queue.removeFirst().view | 151 var extra = queue.removeFirst().view |
151 inSwingThread { | 152 inSwingThread { |
152 if (extra.searchable.selected) { | 153 if (extra.searchable.selected) { |
153 SelectionRequired.disable() | 154 anyRequired.disable() |
155 styledRequired.disable() | |
154 } | 156 } |
155 parent.remove(extra.contents) | 157 parent.remove(extra.contents) |
156 } | 158 } |
157 dirty = true | 159 dirty = true |
158 size -= 1 | 160 size -= 1 |