tonykwok / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

caret in wrong position in clojure syntax highlighter #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. select clojure from editor
2. type (print hello "hello world")
3. try to erase 'w' caret in wrong position ...

What is the expected output? What do you see instead?
(print hello "hello orld")

i see:
(print hello "helloworld")

What version of the product are you using? On what operating system?
jsyntaxpane-0.9.5-b29.jar

Please provide any additional information below.
only this, caret in wrong position

Original issue reported on code.google.com by ghadjiky...@gmail.com on 24 May 2010 at 5:17

GoogleCodeExporter commented 9 years ago
It works fine for me.  Used Linux and Sun JRE 6.0 with the included Syntax 
Tester.
What OS, and Font did you use?  Can I see a screenshot?

Original comment by ayman.al...@gmail.com on 25 May 2010 at 4:04

GoogleCodeExporter commented 9 years ago
Im working with linux 2.6.x, with Sun Java 1.6 (update 20) and the default font 
... 
can i send you a mail with video ? (which mail?)

Original comment by ghadjiky...@gmail.com on 25 May 2010 at 12:11

GoogleCodeExporter commented 9 years ago
OK, please check tis video out ... http://ul.to/agha2o the caret is in the 
middle of 
the character.

Original comment by ghadjiky...@gmail.com on 25 May 2010 at 12:18

GoogleCodeExporter commented 9 years ago
The font does not look monospace to me.  SO the cursor is always not at the 
right 
position.
Can you create a new application, manually set the font to a known monospaced 
font and 
see if it fixes the issue.  It should.

Original comment by ayman.al...@gmail.com on 27 May 2010 at 5:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hmmm i tried this:

...
Font code_font = new Font("Monospaced", Font.PLAIN, 14);
...

It's little better now, but the cursor is still in the letter. By the way this 
problem 
appears only on the string <"Hello World"> not in "print"... i tried Courier 
with the 
same result 

Original comment by ghadjiky...@gmail.com on 27 May 2010 at 9:01

GoogleCodeExporter commented 9 years ago
OK now, problem solved with

Font code_font = new Font("Courier 10 Pitch", Font.PLAIN, 14);

Original comment by ghadjiky...@gmail.com on 29 May 2010 at 6:41

GoogleCodeExporter commented 9 years ago
Good.  I was having the felling the "Hello" would be an issue because of the 
two "l"'s 
in a row, and the H.  characters that are wide and narrow following each other.

Original comment by ayman.al...@gmail.com on 30 May 2010 at 5:28