Better Unicode Handling #26 #141
Replies: 15 comments 63 replies
-
Nice! I'll get some testing going. Should issues be reported in the issues section or here? |
Beta Was this translation helpful? Give feedback.
-
I've been testing this today. You've done an amazing job on it. All the issues I've found are directly related to caret positioning and scrolling when using wide characters (which you pointed out you already know about.) One very small issue that I found (and I'm not sure it's even a bug) is that the text is being drawn one pixel down from the older version. I found this out when using PaintTransient to redraw brackets, I needed to adjust TextOut down a pixel from the y position given by RowColumnToPixels. As a bit of a lark I bypassed the monospaced font test and loaded up Arial to see how it handled it. It worked very well! As you've noted anything using FCharWidth calculations is an issue, but once the hscrolling is switched to pixels instead of chars it should be amazing. I've also tested with a bunch of different unicode chars, wide single byte ones and also multibyte ones. All the painting was perfect as far as I could tell. I haven't really tested performance yet, but in my testing with some pretty large files it looked good. I'll report back if I find more. Great job. |
Beta Was this translation helpful? Give feedback.
-
Other changes to consider:
|
Beta Was this translation helpful? Give feedback.
-
I'm seeing problems with caret horizontal movement where LeftChar should be changed (i.e. scrolling past the end of the visible area.) To see the issue just resize the SynEdit such that moving the caret would change LeftChar to keep the caret visible, but it doesn't. When I turn off the gutter completely, it seems to work better. If doesn't work at all with eoScrollPastEol (it looks like it uses the current line to do the calculating, but with the EOL setting on it would need to adjust the values.) Let me know if you need more steps. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Fixed movement commands and removed CharsInWindow. Now they should work well. Next I need to fix ecChar handling. It is getting close. |
Beta Was this translation helpful? Give feedback.
-
I have committed a number of fixes, the most important of which relate to entering complex graphemes (ecChar, ecIme) and properly handling overwrite mode. It should now work correctly. Try entering emojis with the Windows button + '.'. It results in an ecIme command. I have now run out of things to fix so it is up to you (@MShark67, @JaFi-cz ) to check and discover the bugs. Until then I can now try to polish things in relation to:
|
Beta Was this translation helpful? Give feedback.
-
Refactored Indentation guides and decoupled it from code folding. New SynEdit property IndentGuides with style and color customization (solid/dotted). You need to reinstall SynEdit and load/save forms. |
Beta Was this translation helpful? Give feedback.
-
Implemented selection alpha blending. Try it!! Also vastly reduced flicker when extending the selection with the mouse resulting in scrolling, especially with ActiveLineColor set. Try it before and after. |
Beta Was this translation helpful? Give feedback.
-
PaintFullLInes renamed to FillWholeLines and implemented. Give it a go! @MShark67 I am now finished with #26. Keep testing and when we feel it is production ready we can merge it with the master branch. One thing that needs to be done is to update the packages (+ 2 units - 2 units). I wonder whether you can help with that. |
Beta Was this translation helpful? Give feedback.
-
That's awesome! I notice that empty lines show as "one char selected". That may be intentional so that the selection still shows as contiguous. Does it make sense to follow the VSCode convention and do that on every fully selected line? Basically, the selection would be as if eoShowSpecialChars is on, even if the option isn't on (I mention that just because I toggle back and forth between those a lot. and noticed that the selection matches VSCode.) I hope that makes sense! Either way, nice one! I'll look at the packages. |
Beta Was this translation helpful? Give feedback.
-
I just wanted to double check on the package cleanup stuff: The current package lists don't include the following highlighters that are in the source directory. Should they be added? Some other files of interest: |
Beta Was this translation helpful? Give feedback.
-
Packages merged. Do you know anything about the C++ packages? I don't even have C++Builder installed. I see that the directories include the Delphi dpk files. I am not sure they are needed there but at least those should be replaced. When do you think it would be appropriate to merge with the master branch? |
Beta Was this translation helpful? Give feedback.
-
Merged with the master. |
Beta Was this translation helpful? Give feedback.
-
https://en.delphipraxis.net/topic/6277-synedit-just-got-a-major-uplift/ |
Beta Was this translation helpful? Give feedback.
-
The update of the C++ packages is being taken care off. And talking of demos @JaFi-cz one of the overlooked components is the spell-checking. Would it be possible to add a demo showing off the spell checking component? |
Beta Was this translation helpful? Give feedback.
-
The DirectWrite version of SynEdit in branch DWrite is close to completion! So far the following changes were committed:
The only thing left to implement is the update of editor commands (ecLeft, ecRight, ecDeleteLastChar, etc) and SetCaret to account for multi-code point characters. And of course more testing, testing, testing...
The code now deals with all the issues described in #26, including bidirectional text. SynEdit should now be on a par with, if not better than, the best editors around with respect to Unicode handling. The codebase has also been very much streamlined, with some of the most horrendously complex parts of the code (text painting and word wrap) replaced with much simpler and easier to maintain code and many of the weird parts of the code removed (wide-glyph and hard tab handling). Also the code is more than 1000 lines of code shorter.
But of course there may well be many bugs that need to be addressed before the DWrite branch becomes production ready. So
please test all aspects of SynEdit usage (@MShark67, @JaFi-cz and whoever else reads this discussion) including
Beta Was this translation helpful? Give feedback.
All reactions