This is a follow up on
http://bugs.freepascal.org/view.php?id=27712http://bugs.freepascal.org/view.php?id=27712#c82262This issue is related to your Q"Do you think the default highlight should be dotted underline instead of dotted box?".
Right, I broke the rule myself. It is tricky do decide, if something should go into a bug report or not, and sometimes even it changes when a part of the issue grows bigger.
The problem is that the issue o mantis is about what should happen to selected text.
The code I committed refers to that issue, and sometimes years after I wrote some code I need to know why. Then I can use SVN to find related mantis issues, and read up on it.
In this case I need to read up on the "overwriting" of selections.
As it stands now a huge parts of the notes (including many of mine) are not about this. This makes it much harder to keep track.
Also as a rule of thumb: Mantis is to describe the issue, and describe what solution was picked and why.
If there is a need to discuss many options, that is sometimes better moved to the forum.
But again that is a rule of thumb, it does not always apply, So there was nothing wrong with bringing up added topics.
------------------------------
Well I am obviously never using the IME in productions myself.So I can only act on feedback, and I am happy for any feedback I can get. Of course feedback must be divided in to (and all a valid, but have different importance)
- technical
- official (design) guidelines / usability
- personal taste
In that aspect (especially for issues that are either of the last category or not clear which category, it would be good if more people could comment.
------------------------------
********** IME and highlighting **********
The point of the below in **NOT** to impose my taste (that is not worth anything, since I do not use IME at all). It is for me to categorize the comments I received according to the above outline, and ideally get feedback from more people.
http://bugs.freepascal.org/view.php?id=27712#c82255Can the highlighter be turned off during input with IME? (See img7.png))
The highlighter bothers input with IME.
(According to image, referring to "Same word highlight" during IME activity (within IME)
http://bugs.freepascal.org/view.php?id=27712#c82262The IME has his own drawing attribute. (See https://www.coscom.co.jp/learnjapanese801/lesson11.html [^] and https://developer.mozilla.org/en-US/docs/Mozilla/IME_handling_guide [^] ).
So you must not draw your selfish attribute in during input with IME.
Or you should turn on "IME handled by system" by default.
1) According to the first link, in Japanese words are not separated by spaces. So a "current word" highlight makes limited sense overall? (it acts a current phrase?). That leaves the question if it should be switched off altogether for any Japanese text?
Btw, in such case, if you use SynEdit for Japanese, you can disable the feature entirely. But maybe in mixed text, some detection is needed?
2) The 2nd link mentions that there are 2 styles. One for the entire IME string, one for the clause (active clause). That exists in SynEdit.
The link explicitly states that (in case of full IME integration) those styles are not coming from the IME but are applied by the app. (It gives details on how they can be configured)
Style of each clause
... Therefore, it can be overridden by prefs
It does not mention if or how that style is affected by other styles that may apply in combination.
My test with libre office (my reference for full IME) show, that the IME applies text color, background color, borders, over-lining, and strike-through to the active IME composition (those attributes are taken from the surrounding text).
Libre office does not apply underlining (as that would obliviously interfere with the underlining of the IME style. (In open office the borders (frame) are several pixels away from the IME underline.
I also think that in SynEdit it is correct to use the current font color (e.g. if string and comment are different color, depending on what you are editing.)
That leaves to consider what to do in SynEdit. For current word, it has first to be decided, if that should apply to Japanese at all.
But there also are other highlight, You can set up user-defined-markup
http://wiki.lazarus.freepascal.org/New_IDE_features_since#Multiple_user_defined_word_highlight.2Fmarkupto have some words or text parts to be highlighted. And there may be other highlights in future that would apply.
A)
If they change font color, or bold/italic then they do not interfere with the IME. I would in such cases expect that it is a matter of taste, if they should be applied to an active IME.
Even if they change background, it would still be a matter of taste.
B)
Of course if they add underline, (or maybe a border, or a backgorund color) - that is anything that obscures the IME dotted underline - then it becomes a usability case.
On (A) I would be keen to get opinions from more people who use an IME.
On (B) I would think it might be a good idea, if the active IME would suppress any frame and underline from other highlights.
(Adding background suppression can be later made an option, but would be simple to archive by changing the code on your own PC)
On example of the "current word" highlight that would mean, that the background color would still change, but the border would no longer be drawn into the IME.
------------------------------
********** IME and the drop down **********
I noted that the IME dropdown, is kind of glued right below the text.
Maybe between 1 and 3 extra pixel would improve the visibility of the underlines?
For testing:
components\synedit\lazsynimm.pas
line 518
In: procedure LazSynImeFull.WMImeRequest(var Msg: TMessage);
cp^.cLineHeight := TCustomSynEdit(FriendEdit).LineHeight + 1;
The " + 1" does not currently exist. Also try " + 2" or " + 3"
------------------------------
Other comments?