Page 10 of 27

Posted: Thu Feb 25, 2010 4:01 pm
by DV
se7h wrote:подобный функционал лучше всего добавить в плагин CodeFold[/url]
Это правда. XBrackets работает со скобками на уровне обычного текста, абстрагируясь от таких понятий, как языки программирования, и в общем-то не претендуя на стопроцентную достоверность нахождения парных скобок. Настройки для пропуска скобок после // и экранированных скобок ( \] , \{ ) сужают область абстрагирования, но опять же не связаны с понятиями языков программирования и блоков кода. Фигурные скобки { } рассматриваются плагином точно так же, как все остальные, без каких-либо дополнительных предположений о контексте их использования.

Posted: Fri Feb 26, 2010 11:13 am
by Deim0s
DV
Спасибо за добавления параметра hlt_bkgnd. Если можно, ещё пара вопросов:
Можно ли сделать, что бы выделение самого AkelPad "перебивало" выделение XBrackets?
Сейчас:
Image
Хотелось бы:
Image
Сейчас при выделении слова, двойным кликом в том числе, если выделение находится перед/после скобки, включается подсветка:
Image
Image
Можно ли сделать, что бы этого не происходило при выделении?
Image

Posted: Fri Feb 26, 2010 1:53 pm
by DV
Deim0s wrote:Можно ли сделать, что бы выделение самого AkelPad "перебивало" выделение XBrackets?
Можно сделать лучше:

Code: Select all

color = (background_color + highlight_color)/2
Т.е. наложение цветов: подсветку скобок на фоне выделенного текста.

По поводу второго вопроса - works as designed.

Posted: Fri Feb 26, 2010 3:05 pm
by Deim0s
DV
Можно сделать лучше:
Если взять вот такую ситуацию с выделением:

Image
(это как хотелось бы, но без второго вопроса пока невозможно :D)

то сейчас выглядит так:

Image

если я Вас правильно понял:
Т.е. наложение цветов: подсветку скобок на фоне выделенного текста.
будет выглядеть так:

Image

Было бы не плохо на данный момент, если можно реализовать.

Posted: Mon Mar 01, 2010 4:47 pm
by DV
XBrackets v.3.5
+ при активном 'hlt_bkgnd' цвет подсветки накладывается на цвет выделения

Posted: Mon Mar 08, 2010 4:42 am
by cnnnc
New version of Akelpad, both 3.7.4 and 4.4.1, not work well with Xbrackets.dll.
I set custom Brackets most use in Chinese in Xbrackets.ini. When I enter a LeftBracket "(" via a IME, but I unable to get the RightBracket ")".
When I change sourcecode in Akeldll.h from precious version of Xbrackets

Code: Select all

#define AKELDLL MAKE_IDENTIFIER(1, 1, 0, 1)
into

Code: Select all

#define AKELDLL MAKE_IDENTIFIER(1, 2, 0, 0)
in order to test if bug with Xbrackets. But the result is Xbrakcets still unable to autoComplete bracket. That show XBrackets is OK, but Akelpad.
Following is my XBrackets.ini:

Code: Select all

[Options]
OptionsFlags=4619
HighlightRGB=D0404000
HtmlFileExts=htm; xml; php
Comment1FileExts=cs; java; js; php
next_char_ok=.,!?:;<)]}"'>/ »’”〕〉》」』〗】)]}
prev_char_ok=([{<= «‘“〔〈《「『〖【([{
user_brpairs=«» ‘’ “” 〔〕 〈〉 《》 「」 『』 〖〗 【】 () [] {}
hlt_bothbr=1
ovr_autobr=0
sel_autobr=0
all_autobr=3
hlt_bkgnd=0


Posted: Wed Mar 10, 2010 7:28 pm
by DV
cnnnc wrote:I set custom Brackets most use in Chinese in Xbrackets.ini. When I enter a LeftBracket "(" via a IME, but I unable to get the RightBracket ")".
Can you send me your "XBrackets.ini" via e-mail or upload it somewhere? (but not to rapidshare or similar, please!)
Or it would be even better if you could debug Brackets plugin. (Of course, I can debug the plugin by myself, but I have absolutely no knowledge of Eastern languages). It would be wonderful to set a breakpoint in the beginning of OnEditCharPressed function and follow to the end of this function or at least to this line:

Code: Select all

nBracketType = getLeftBracketType(wch);
to understand what is getting wrong.

Posted: Thu Mar 11, 2010 1:44 am
by cnnnc
Open following URL and then select download:

http://cid-df3847632ddf72c3.skydrive.li ... ackets.ini

Oh, I unable to debug it!

Posted: Thu Mar 11, 2010 2:11 pm
by DV
Well, it looks like a problem of IME or whatever that generates or passes a character code to be inserted in AkelPad's edit window.
When I intercept WM_CHAR inside XBrackets plugin and replace the character code with 0xFF08 (this is the code op the opening bracket you mentioned), this bracket is autocompleted by XBrackets. So the plugin seems to work correctly. So it looks the problem is somewhere between your input (when the pressed character code must be generated) and AkelEdit window which must receive the character code through WM_CHAR message. Either incorrect character code is generated or it is incorrectly passed to AkelEdit.

Posted: Fri Mar 12, 2010 4:02 am
by Instructor
DV
У cnnnc должно быть символ вставляется через WM_IME_CHAR.

Posted: Fri Mar 12, 2010 9:01 am
by DV
Instructor wrote:DV
У cnnnc должно быть символ вставляется через WM_IME_CHAR.
А разве WM_IME_CHAR не генерирует потом WM_CHAR? Для не-юникодных окон сказано прямо:
For a non-Unicode window, if the WM_IME_CHAR message includes a double-byte character and the application passes this message to DefWindowProc, the IME converts this message into two WM_CHAR messages, each containing one byte of the double-byte character.
А что с юникодными, надо гадать на кофейной гуще, полагаю.

Posted: Wed Mar 17, 2010 12:17 pm
by cnnnc
DV
Have you keep previous Version of Xbrackets about 26 Aug 2009 release?
If yes please send me a copy for test.

Posted: Wed Mar 17, 2010 1:04 pm
by DV
cnnnc wrote:Have you keep previous Version of Xbrackets about 26 Aug 2009 release?
No, I did not. However I can ensure you that it works with IME in the same way as the latest version - i.e. has no special support of IME at all :)
I can upload a test version with test support of IME if you want. What uploading server would you prefer in such case?

Posted: Wed Mar 17, 2010 4:05 pm
by cnnnc
Oh, no, thanks

And I test several Previous versions of Akelpad with XBrackets:
4.3.6 and HigherVersion not autocomplete Chinesebrackets well with XBrackets,
but 4.3.5 and LowerVersion did.

Posted: Thu Mar 18, 2010 8:21 am
by DV
cnnnc, if you built XBrackets sources by yourself, you can try the following patch:

file XBrackets\Plugin.c, line 502

change

Code: Select all

  if (bBracketsAutoComplete)
  {
    if (uMsg == WM_CHAR)
    {
to

Code: Select all

  if (bBracketsAutoComplete)
  {
    if ((uMsg == WM_CHAR) ||
        (uMsg == WM_IME_CHAR && g_bAkelEdit && !g_bOldWindows))
    {