diff --git a/programs/develop/tinypad/trunk/tinypad.asm b/programs/develop/tinypad/trunk/tinypad.asm index 19399a4421..a7347a43c3 100644 --- a/programs/develop/tinypad/trunk/tinypad.asm +++ b/programs/develop/tinypad/trunk/tinypad.asm @@ -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 diff --git a/programs/develop/tinypad/trunk/tp-common.asm b/programs/develop/tinypad/trunk/tp-common.asm index 05246bd31f..fc2165b77f 100644 --- a/programs/develop/tinypad/trunk/tp-common.asm +++ b/programs/develop/tinypad/trunk/tp-common.asm @@ -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 diff --git a/programs/develop/tinypad/trunk/tp-files.asm b/programs/develop/tinypad/trunk/tp-files.asm index 5595f5dc58..7a697825c3 100644 --- a/programs/develop/tinypad/trunk/tp-files.asm +++ b/programs/develop/tinypad/trunk/tp-files.asm @@ -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 diff --git a/programs/develop/tinypad/trunk/tp-key.asm b/programs/develop/tinypad/trunk/tp-key.asm index 2d5970533c..8fa3c56c34 100644 --- a/programs/develop/tinypad/trunk/tp-key.asm +++ b/programs/develop/tinypad/trunk/tp-key.asm @@ -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 diff --git a/programs/develop/tinypad/trunk/tp-tabctl.asm b/programs/develop/tinypad/trunk/tp-tabctl.asm index 4e0a73ae32..da1e24a40e 100644 --- a/programs/develop/tinypad/trunk/tp-tabctl.asm +++ b/programs/develop/tinypad/trunk/tp-tabctl.asm @@ -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