forked from KolibriOS/kolibrios
Tinypad - fix for r.4487 for single lines (example - CMD program)
git-svn-id: svn://kolibrios.org@4552 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
881da0723b
commit
b08574ec1d
@ -16,7 +16,7 @@ put_to_clipboard:
|
|||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
lodsw
|
lodsw
|
||||||
rep movsb
|
rep movsb
|
||||||
mov ax,0x0a0d
|
mov ax,0x0a0d ; EOS (end of string)
|
||||||
stosw
|
stosw
|
||||||
; mov ax,0x0d
|
; mov ax,0x0d
|
||||||
; stosb
|
; stosb
|
||||||
@ -24,6 +24,7 @@ put_to_clipboard:
|
|||||||
dec ecx
|
dec ecx
|
||||||
jnz @b
|
jnz @b
|
||||||
|
|
||||||
|
sub edi,2 ; delete last EOS (0x0a0d)
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
stosb
|
stosb
|
||||||
; building the clipboard slot header
|
; building the clipboard slot header
|
||||||
@ -180,7 +181,7 @@ convert_clipboard_buf_to_copy_buf:
|
|||||||
mov esi,eax
|
mov esi,eax
|
||||||
add esi,4*3
|
add esi,4*3
|
||||||
mov ecx,[eax]
|
mov ecx,[eax]
|
||||||
sub ecx,4*3
|
sub ecx,4*3-1
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
cld
|
cld
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
@ -188,7 +189,7 @@ convert_clipboard_buf_to_copy_buf:
|
|||||||
lodsb
|
lodsb
|
||||||
|
|
||||||
test al,al
|
test al,al
|
||||||
jz .inc_counter ;.end_of_data
|
jz .end_of_data
|
||||||
|
|
||||||
cmp al,0x0d
|
cmp al,0x0d
|
||||||
je .check_0x0a
|
je .check_0x0a
|
||||||
@ -220,15 +221,17 @@ convert_clipboard_buf_to_copy_buf:
|
|||||||
sub eax,ebx
|
sub eax,ebx
|
||||||
sub eax,6
|
sub eax,6
|
||||||
mov [ebx],eax ; size of current string
|
mov [ebx],eax ; size of current string
|
||||||
|
|
||||||
mov ebx,edi
|
mov ebx,edi
|
||||||
add edi,6
|
add edi,6
|
||||||
inc edx
|
inc edx
|
||||||
jmp .loop
|
jmp .loop
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.end_of_data:
|
.end_of_data:
|
||||||
|
mov eax,edi
|
||||||
|
sub eax,ebx
|
||||||
|
sub eax,6
|
||||||
|
mov [ebx],eax ; size of current string
|
||||||
sub edi,[copy_buf]
|
sub edi,[copy_buf]
|
||||||
sub edi,6
|
|
||||||
mov [copy_size],edi
|
mov [copy_size],edi
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
@ -289,5 +292,6 @@ know_number_line_breaks:
|
|||||||
inc esi
|
inc esi
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
.end_of_data:
|
.end_of_data:
|
||||||
|
inc ebx
|
||||||
ret
|
ret
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
Loading…
Reference in New Issue
Block a user