Tinypad 4.0.4 (put filename of current tab into open/save dialog)
git-svn-id: svn://kolibrios.org@327 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a79e7c4171
commit
dfe81eb28d
@ -3,7 +3,7 @@
|
||||
; compiler: flat assembler 1.67.18
|
||||
; memory to compile: 3.0/9.0 MBytes (without/with size optimizations)
|
||||
; version: 4.0.4
|
||||
; last update: 2007-02-01 (Feb 01, 2007)
|
||||
; last update: 2007-02-08 (Feb 08, 2007)
|
||||
; minimal kernel: revision #270 (svn://kolibrios.org/kernel)
|
||||
;-----------------------------------------------------------------------------
|
||||
; originally by: Ville Michael Turjanmaa >> villemt@aton.co.jyu.fi
|
||||
@ -25,6 +25,7 @@
|
||||
; - small drawing fix for gutter and line saved/modified markers
|
||||
; (incorrect calculations)
|
||||
; - incorrect lines marking on Ctrl+V
|
||||
; - put filename of current tab into open/save dialog (noticed by Maxxxx32)
|
||||
; changes:
|
||||
; - editor and other modifications to ease parts placement changing,
|
||||
; including changes in look
|
||||
|
@ -536,15 +536,18 @@ func update_caption ;/////////////////////////////////////////////////////////
|
||||
lea esi,[cur_editor.FilePath]
|
||||
mov edi,s_title
|
||||
|
||||
xor ecx,ecx
|
||||
@@: lodsb
|
||||
cmp al,0
|
||||
je @f
|
||||
stosb
|
||||
inc ecx
|
||||
jmp @b
|
||||
@@:
|
||||
push ecx
|
||||
mov dword[edi],' - '
|
||||
add edi,3
|
||||
@@: mov esi,htext
|
||||
mov esi,htext
|
||||
mov ecx,htext.size
|
||||
cld
|
||||
rep movsb
|
||||
@ -554,6 +557,19 @@ func update_caption ;/////////////////////////////////////////////////////////
|
||||
|
||||
mcall 71,1,s_title
|
||||
|
||||
cmp [do_not_draw],0
|
||||
jne @f
|
||||
lea esi,[cur_editor.FilePath]
|
||||
mov edi,tb_opensave.text
|
||||
mov ecx,[esp]
|
||||
cld
|
||||
rep movsb
|
||||
pop ecx
|
||||
mov [tb_opensave.length],cl
|
||||
clc
|
||||
ret
|
||||
@@:
|
||||
add esp,4
|
||||
clc
|
||||
ret
|
||||
endf
|
||||
|
@ -146,7 +146,7 @@ endf
|
||||
;-----------------------------------------------------------------------------
|
||||
func load_file ;//////////////////////////////////////////////////////////////
|
||||
;-----------------------------------------------------------------------------
|
||||
cmp [tb_opensave.text],0
|
||||
cmp [tb_opensave.length],0
|
||||
jne @f
|
||||
stc
|
||||
ret
|
||||
@ -200,19 +200,23 @@ func load_file ;//////////////////////////////////////////////////////////////
|
||||
jne @f
|
||||
mov ebp,cur_editor
|
||||
jmp .lp1
|
||||
@@: call create_tab
|
||||
@@: inc [do_not_draw]
|
||||
call create_tab
|
||||
dec [do_not_draw]
|
||||
.lp1: push ecx esi edi
|
||||
mov esi,tb_opensave.text
|
||||
lea edi,[ebp+TABITEM.Editor.FilePath]
|
||||
movzx ecx,[tb_opensave.length]
|
||||
cld
|
||||
rep movsb
|
||||
mov byte[edi],0
|
||||
lea edi,[ebp+TABITEM.Editor.FilePath]
|
||||
movzx ecx,[tb_opensave.length]
|
||||
@@: cmp byte[edi+ecx-1],'/'
|
||||
je @f
|
||||
dec ecx
|
||||
jmp @b
|
||||
inc ecx
|
||||
@@: dec ecx
|
||||
jz @f
|
||||
cmp byte[edi+ecx-1],'/'
|
||||
jne @b
|
||||
@@: mov [ebp+TABITEM.Editor.FileName],ecx
|
||||
call flush_cur_tab
|
||||
pop edi esi ecx
|
||||
|
@ -137,14 +137,6 @@ func key.ctrl_o ;///// ENTER OPEN FILENAME ///////////////////////////////////
|
||||
mov [bot_dlg_handler],osdlg_handler
|
||||
mov [focused_tb],tb_opensave
|
||||
|
||||
mov ecx,[f_info.length]
|
||||
mov [tb_opensave.length],cl
|
||||
jecxz @f
|
||||
mov esi,f_info.path
|
||||
mov edi,tb_opensave.text
|
||||
cld
|
||||
rep movsb
|
||||
|
||||
@@: mov al,[tb_opensave.length]
|
||||
mov [tb_opensave.pos.x],al
|
||||
mov [tb_opensave.sel.x],0
|
||||
|
@ -574,10 +574,6 @@ func get_tab_size ;///// GET TAB WIDTH ///////////////////////////////////////
|
||||
jae .lp1
|
||||
lea eax,[ebp+TABITEM.Editor.FilePath]
|
||||
add eax,[ebp+TABITEM.Editor.FileName]
|
||||
cmp byte[eax],0
|
||||
jne @f
|
||||
int3
|
||||
@@:
|
||||
call strlen
|
||||
imul ebx,eax,6
|
||||
add ebx,9
|
||||
|
Loading…
Reference in New Issue
Block a user