flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > [Bug in FASMW]"Vertical selection" resets when... Goto page 1, 2 Next |
Author |
|
rohagymeg 25 Aug 2011, 02:22
By the way, can anyone explain to me(I don't wanna make a new thread for this)
: In the options menu, what does compiler memory do? What value size should I put there? What does revive dead keys do? Thanks! |
|||
25 Aug 2011, 02:22 |
|
revolution 25 Aug 2011, 02:46
You will notice in the source code FASMW.ASM it has this:
Code: ;skip 2467 lines show_ok: invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 invoke SendMessage,[hwnd_asmedit],AEM_GETMODE,0,0 and eax,not AEMODE_VERTICALSEL ;<---- See here invoke SendMessage,[hwnd_asmedit],AEM_SETMODE,eax,0 ;... |
|||
25 Aug 2011, 02:46 |
|
revolution 25 Aug 2011, 02:50
rohagymeg wrote: In the options menu, what does compiler memory do? rohagymeg wrote: What does revive dead keys do? |
|||
25 Aug 2011, 02:50 |
|
ouadji 25 Aug 2011, 08:04
with or without this line Code: and eax,not AEMODE_VERTICALSEL (i don't understand, what is the goal of this line) that said, maybe this solution: (it works) Code: show_ok: invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 invoke SendMessage,[hwnd_asmedit],AEM_GETMODE,0,0 push eax ;<-- + and eax,not AEMODE_VERTICALSEL invoke SendMessage,[hwnd_asmedit],AEM_SETMODE,eax,0 mov eax,[aepos.selectionLine] xchg eax,[aepos.caretLine] mov [aepos.selectionLine],eax mov eax,[aepos.selectionPosition] xchg eax,[aepos.caretPosition] mov [aepos.selectionPosition],eax invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 pop eax ;<-- + invoke SendMessage,[hwnd_asmedit],AEM_SETMODE,eax,0 ;<-- + xor eax,eax ret show_failed: or eax,-1 ret |
|||
25 Aug 2011, 08:04 |
|
rohagymeg 25 Aug 2011, 14:05
revolution wrote: You will notice in the source code FASMW.ASM it has this: Then the other occurrance might be when I just press ctrl+F9 and the compiler shows a completed message. It has to be tweaked there too. But I don't want to hack this because I think this is a bug and should be fixed in the official release. I'm curious about what Tomasz can say about this. |
|||
25 Aug 2011, 14:05 |
|
Tomasz Grysztar 25 Aug 2011, 14:27
revolution already explained it - when a compilation error occurs, fasmw sets the selection to line that caused the error. To select line the horizontal selection mode is needed, so it is switched on for that purpose.
|
|||
25 Aug 2011, 14:27 |
|
rohagymeg 25 Aug 2011, 14:50
Alright, got it! push eax, pop eax, makes perfect sense! It saves the state(if it was on or off before changing it to off) and restores that state after the compiler displayed the message. I guess you'll fix this, but you didn't mention(maybe because it's common sense).
|
|||
25 Aug 2011, 14:50 |
|
Tomasz Grysztar 25 Aug 2011, 15:03
The point of this feature is to make the erroneous line selected, and it works like it was intended. If it was to be for the time of displaying error summary only, then not only selection mode, but also selection position (including caret) would have to be restored, and this would not be behavior I wanted.
|
|||
25 Aug 2011, 15:03 |
|
ouadji 25 Aug 2011, 15:18
i tried both cases. with and without "and eax,not AEMODE_VERTICALSEL" (in both cases with vertical selection : on) i see no difference in behavior. in both cases, fasmw correctly selects the line that caused the error. (Can anyone confirm this?) |
|||
25 Aug 2011, 15:18 |
|
rohagymeg 26 Aug 2011, 00:01
EDIT: Okay, now I get it(it took a while)! It selects the line with the first error. Okay, this is a good explanation.
ouadji, it doesn't select the actual line in the IDE (after error message)when I use your code. So that's what these clever guys were talking about. They have much more experience than us |
|||
26 Aug 2011, 00:01 |
|
Madis731 26 Aug 2011, 06:50
Vertical selection also tends to be about personal taste. I like it very much, but I sometimes forget that its on and when I copy some text from other editors, I feel like the clipboard is empty, while actually I just need to Alt+Ins Ctrl+V.
I would even welcome a feature where vertical select had a timeout equal to my short memory span |
|||
26 Aug 2011, 06:50 |
|
ouadji 26 Aug 2011, 08:09
sorry, I have still tried several times, but I see no difference in behavior. (with or without "and eax,not AEMODE_VERTICALSEL" and vertical selection ON). In all cases, fasmw correctly selects the line that caused the error. I don't understand, really! Does anyone have an example of .asm file to download with which I can see this difference? Thank you. |
|||
26 Aug 2011, 08:09 |
|
revolution 26 Aug 2011, 08:48
ouadji wrote: Does anyone have an example of .asm file to download with which I can see this difference? Code: macro ERROR {error} ERROR |
|||
26 Aug 2011, 08:48 |
|
ouadji 26 Aug 2011, 10:05
with or without, no difference. In both cases, before compiling, the vertical selection is on. (I hope you can see the picture below) Code: ;CODE A (original code) == "with" ;------ show_ok: invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 invoke SendMessage,[hwnd_asmedit],AEM_GETMODE,0,0 and eax,not AEMODE_VERTICALSEL invoke SendMessage,[hwnd_asmedit],AEM_SETMODE,eax,0 mov eax,[aepos.selectionLine] xchg eax,[aepos.caretLine] mov [aepos.selectionLine],eax mov eax,[aepos.selectionPosition] xchg eax,[aepos.caretPosition] mov [aepos.selectionPosition],eax invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 xor eax,eax ret show_failed: or eax,-1 ret Code: ;CODE B == "without" ;------ show_ok: invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 ; invoke SendMessage,[hwnd_asmedit],AEM_GETMODE,0,0 ; and eax,not AEMODE_VERTICALSEL ; invoke SendMessage,[hwnd_asmedit],AEM_SETMODE,eax,0 mov eax,[aepos.selectionLine] xchg eax,[aepos.caretLine] mov [aepos.selectionLine],eax mov eax,[aepos.selectionPosition] xchg eax,[aepos.caretPosition] mov [aepos.selectionPosition],eax invoke SendMessage,[hwnd_asmedit],AEM_SETPOS,aepos,0 xor eax,eax ret show_failed: or eax,-1 ret As you can see, there is no difference in behavior. |
|||
26 Aug 2011, 10:05 |
|
revolution 26 Aug 2011, 10:31
And what about the situation when you move to different lines from the error box?
|
|||
26 Aug 2011, 10:31 |
|
ouadji 26 Aug 2011, 11:27
In both cases, no problem and identical behavior. In the error dialog box, If I click on "revolution.asm (2)", line 2 is selected and highlighted ("macro ERROR {error}") ... and if I click on "revolution.asm (3), then the line 3 is selected and highlighted ("ERROR"). This, again, in both cases. |
|||
26 Aug 2011, 11:27 |
|
Tomasz Grysztar 26 Aug 2011, 12:16
ouadji: you hit a special case when the line is the last line in file. Try having an error in some middle line.
|
|||
26 Aug 2011, 12:16 |
|
ouadji 26 Aug 2011, 18:19
ok Tomasz, I saw the problem, I understood! I tried a solution (below) This preserves the state of the selection. When the summary dialog box is open, no problem. but, if the selection is in vertical mode before compiling, then when you close the summary dialog box, the error line is no longer highlighted ... because the vertical selection is restored. That said, for the user who often uses the vertical selection, it is (very) annoying that this vertical selection is disabled after each compilation with error(s). Code: ;FASMW.ASM mem_vs dd ? proc SummaryDialog hwnd_dlg,msg,wparam,lparam ... mov ebx,FALSE cmp [msg],WM_CLOSE je .close ... .initdialog: invoke SendMessage,[hwnd_asmedit],AEM_GETMODE,0,0 mov [mem_vs],eax ... .command: cmp [wparam],ID_LINES + LBN_SELCHANGE shl 16 je .show_line mov ebx,TRUE cmp [wparam],IDCANCEL ; => BUTTON "OK" jne .finish ; cmp [wparam],IDOK ;useless ; jne .finish .close: mov eax,[mem_vs] invoke SendMessage,[hwnd_asmedit],AEM_SETMODE,eax,0 invoke EndDialog,[hwnd_dlg],ebx .processed: mov eax,1 .finish: pop edi esi ebx ret endp with "Wink" the problem is much less annoying, because the current line is highlighted. when I close the dialog box, the last selected line (the last selected error line) is always highlighted.I could "more" easily add this feature in Wink with less inconvenience. |
|||
26 Aug 2011, 18:19 |
|
rohagymeg 26 Aug 2011, 19:22
I agree with ouadji and to add something to the discussion:
For someone who uses this feature often, it needs to be saved in the ini file also. I bet a lot of people work this way, so this is not a stupid request to implement in the official release. |
|||
26 Aug 2011, 19:22 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.