git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cjk support wip
[fanfix.git]
/
src
/
jexer
/
backend
/
SwingTerminal.java
diff --git
a/src/jexer/backend/SwingTerminal.java
b/src/jexer/backend/SwingTerminal.java
index 58b8f799cf7f1e1153f2ef60f2af486ba96d03da..bd1ba87ce2d3c442ce5254f358254586cae0227e 100644
(file)
--- a/
src/jexer/backend/SwingTerminal.java
+++ b/
src/jexer/backend/SwingTerminal.java
@@
-1265,18
+1265,31
@@
public class SwingTerminal extends LogicalScreen
int xPixel = cursorX * textWidth + left;
int yPixel = cursorY * textHeight + top;
Cell lCell = logical[cursorX][cursorY];
int xPixel = cursorX * textWidth + left;
int yPixel = cursorY * textHeight + top;
Cell lCell = logical[cursorX][cursorY];
+ int cursorWidth = textWidth;
+ switch (lCell.getWidth()) {
+ case SINGLE:
+ // NOP
+ break;
+ case LEFT:
+ cursorWidth *= 2;
+ break;
+ case RIGHT:
+ cursorWidth *= 2;
+ xPixel -= textWidth;
+ break;
+ }
gr.setColor(attrToForegroundColor(lCell));
switch (cursorStyle) {
default:
// Fall through...
case UNDERLINE:
gr.setColor(attrToForegroundColor(lCell));
switch (cursorStyle) {
default:
// Fall through...
case UNDERLINE:
- gr.fillRect(xPixel, yPixel + textHeight - 2,
text
Width, 2);
+ gr.fillRect(xPixel, yPixel + textHeight - 2,
cursor
Width, 2);
break;
case BLOCK:
break;
case BLOCK:
- gr.fillRect(xPixel, yPixel,
text
Width, textHeight);
+ gr.fillRect(xPixel, yPixel,
cursor
Width, textHeight);
break;
case OUTLINE:
break;
case OUTLINE:
- gr.drawRect(xPixel, yPixel,
text
Width - 1, textHeight - 1);
+ gr.drawRect(xPixel, yPixel,
cursor
Width - 1, textHeight - 1);
break;
}
}
break;
}
}