Skip to content

Instantly share code, notes, and snippets.

@Bandd-k
Last active April 3, 2016 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bandd-k/9388c06d8e77be6b315fdce5327d297c to your computer and use it in GitHub Desktop.
Save Bandd-k/9388c06d8e77be6b315fdce5327d297c to your computer and use it in GitHub Desktop.
Index: trunk/data/tp-defines.inc
===================================================================
--- trunk/data/tp-defines.inc (revision 6386)
+++ trunk/data/tp-defines.inc (working copy)
@@ -34,6 +34,7 @@
define mm.Options.SecureSel set_opt.secure_sel
define mm.Options.AutoBrackets set_opt.auto_braces
define mm.Options.AutoIndents set_opt.auto_indents
+define mm.Options.SaveCompile set_opt.save_compile
define mm.Options.OptimalFill set_opt.optimal_fill
define mm.Options.LineNumbers set_opt.line_numbers
define mm.Options.ZoomIn key.ctrl_plus
Index: trunk/data/tp-idata.inc
===================================================================
--- trunk/data/tp-idata.inc (revision 6386)
+++ trunk/data/tp-idata.inc (working copy)
@@ -112,6 +112,7 @@
sz ini_options_secure_sel,'secure_sel',0
sz ini_options_auto_braces,'auto_braces',0
sz ini_options_auto_indent,'auto_indent',0
+sz ini_options_save_compile,'save_compile',0
sz ini_options_optim_save,'optim_save',0
sz ini_options_line_nums,'line_nums',0
;-----------------------------------------------------------------------------
Index: trunk/data/tp-locale.inc
===================================================================
--- trunk/data/tp-locale.inc (revision 6386)
+++ trunk/data/tp-locale.inc (working copy)
@@ -168,6 +168,7 @@
ru,'??????᭮? ?뤥?????' ,'',SecureSel ,\
ru,'??⮬???᪨? ᪮???' ,'',AutoBrackets,\
ru,'??⮬???᪨? ?????' ,'',AutoIndents ,\
+ ru,'???࠭???? ??। ???????樥?' ,'',SaveCompile ,\
ru,'??⨬??쭮? ??࠭????' ,'',OptimalFill ,\
ru,'-','',,\
ru,'???譨? ???...' ,'',Appearance ,\
@@ -179,6 +180,7 @@
en,'Secure selection' ,'',SecureSel ,\
en,'Automatic brackets' ,'',AutoBrackets,\
en,'Automatic indents' ,'',AutoIndents ,\
+ en,'Save before compilation' ,'',SaveCompile ,\
en,'Optimal fill on saving' ,'',OptimalFill ,\
en,'-','',,\
en,'Appearance...' ,'',Appearance ,\
@@ -190,6 +192,7 @@
et,'Turvaline valimine' ,'',SecureSel ,\
et,'Automaatsed sulud' ,'',AutoBrackets,\
et,'Automaatsed taandread' ,'',AutoIndents ,\
+ et,'Salvestada enne koostada' ,'',SaveCompile ,\
et,'Optimaalne t?itmine salvestamisel','',OptimalFill,\
et,'-','',,\
et,'V?limus...' ,'',Appearance ,\
@@ -201,6 +204,7 @@
sp,'Selecci?n segura' ,'',SecureSel ,\
sp,'Par?ntesis autom?ticos' ,'',AutoBrackets,\
sp,'Identaci?n autom?tica' ,'',AutoIndents ,\
+ sp,'Guardar antes de compilar' ,'',SaveCompile ,\
sp,'Llenado ?ptimo al guardar','',OptimalFill ,\
sp,'-','',,\
sp,'Apariencia...' ,'',Appearance
Index: trunk/data/tp-udata.inc
===================================================================
--- trunk/data/tp-udata.inc (revision 6386)
+++ trunk/data/tp-udata.inc (working copy)
@@ -126,6 +126,7 @@
secure_sel db ?
auto_braces db ?
auto_indent db ?
+save_compile db ?
optim_save db ?
line_nums db ?
Index: trunk/tinypad.asm
===================================================================
--- trunk/tinypad.asm (revision 6386)
+++ trunk/tinypad.asm (working copy)
@@ -383,6 +383,8 @@
mov [auto_braces],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_auto_indent,1
mov [auto_indent],al
+ invoke ini.get_int,ini_path,ini_sec_options,ini_options_save_compile,0
+ mov [save_compile],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_optim_save,1
mov [optim_save],al
invoke ini.get_int,ini_path,ini_sec_options,ini_options_line_nums,0
@@ -435,6 +437,8 @@
invoke ini.set_int,ini_path,ini_sec_options,ini_options_auto_braces,eax
movzx eax,[auto_indent]
invoke ini.set_int,ini_path,ini_sec_options,ini_options_auto_indent,eax
+ movzx eax,[save_compile]
+ invoke ini.set_int,ini_path,ini_sec_options,ini_options_save_compile,eax
movzx eax,[optim_save]
invoke ini.set_int,ini_path,ini_sec_options,ini_options_optim_save,eax
movzx eax,[line_nums]
@@ -469,6 +473,16 @@
;-----------------------------------------------------------------------------
; FASM infile,outfile,/path/to/files[,run]
;-----------------------------------------------------------------------------
+
+
+ ; check need save or no
+ cmp [save_compile],1
+ jne .st_fasm
+ cmp [cur_editor.Modified],0
+ je .st_fasm
+ call save_file
+ call drawwindow
+ .st_fasm:
cmp [cur_editor.AsmMode],0
jne @f
ret
@@ -523,7 +537,7 @@
mov dword[edi],',dbg'
do_run:
add edi,4
- @@:
+ @@:
mov al,0
stosb
@@ -586,6 +600,9 @@
.auto_indents:
xor [auto_indent],1
ret
+ .save_compile:
+ xor [save_compile],1
+ ret
.auto_braces:
xor [auto_braces],1
ret
Index: trunk/tp-popup.asm
===================================================================
--- trunk/tp-popup.asm (revision 6386)
+++ trunk/tp-popup.asm (working copy)
@@ -274,10 +274,16 @@
test [auto_indent],1
jnz @f
and byte[mm.Options+6],0xFD
+
@@: or byte[mm.Options+7],0x02
+ test [save_compile],1
+ jnz @f
+ and byte[mm.Options+7],0xFD
+
+ @@: or byte[mm.Options+8],0x02
test [optim_save],1
jnz @f
- and byte[mm.Options+7],0xFD
+ and byte[mm.Options+8],0xFD
@@: ret
pi_sel dd ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment