hc_upd20160126a.diff
src/com/goldencode/p2j/ui/client/gui/EditorGuiImpl.java 2016-01-26 21:44:39 +0000 | ||
---|---|---|
1068 | 1068 | |
1069 | 1069 |
setScrollPosition(); |
1070 | 1070 |
|
1071 |
int contentLength = contentLength(); |
|
1072 |
|
|
1071 | 1073 |
// if this is a double-click, select the current word and its right-side spaces |
1072 |
if (e.getClickCount() == 2) |
|
1074 |
if (e.getClickCount() == 2 && contentLength > 0)
|
|
1073 | 1075 |
{ |
1074 | 1076 |
int cursorOffset = getCursorOffset() - 1; |
1075 | 1077 | |
... | ... | |
1077 | 1079 |
int selEnd = cursorOffset; |
1078 | 1080 |
|
1079 | 1081 |
String content = resolveContent(); |
1080 |
int contentLength = contentLength(); |
|
1081 | 1082 |
|
1082 | 1083 |
// go left until non-space is found (stay on space), |
1083 | 1084 |
// then space until non-space is found (stay on non-space) |
src/com/goldencode/p2j/ui/client/gui/ScrollBarGuiButton.java 2016-01-26 21:31:32 +0000 | ||
---|---|---|
246 | 246 |
// emit the sequential scroll events |
247 | 247 |
ScrollEvent evt = |
248 | 248 |
((ScrollBarGuiImpl)owner).createAutoScrollEvent(position); |
249 |
|
|
250 |
tc.postOSEvent(evt); |
|
249 |
|
|
250 |
if (evt != null) |
|
251 |
{ |
|
252 |
tc.postOSEvent(evt); |
|
253 |
} |
|
251 | 254 |
} |
252 | 255 |
} |
253 | 256 |
catch (InterruptedException ex) |
src/com/goldencode/p2j/ui/client/gui/ScrollBarGuiImpl.java 2016-01-26 21:32:40 +0000 | ||
---|---|---|
768 | 768 |
*/ |
769 | 769 |
public ScrollEvent createAutoScrollEvent(Position btn) |
770 | 770 |
{ |
771 |
if (position <= 0 || position >= max) |
|
772 |
{ |
|
773 |
return null; |
|
774 |
} |
|
775 |
|
|
771 | 776 |
// start with the current position |
772 | 777 |
int newPos = position; |
773 | 778 |
|