Update of /cvsroot/vim-latex/vimfiles/plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv31595
Modified Files:
imaps.vim
Log Message:
Changing encoding from one locale to the next causes huge ugly screen
flickers. Therefore only change encoding if the original encoding is not
latin1. This will at least cause it to be smoother on machines using latin1
encoding.
The problem ofcourse will still be there for other locales. Therefore, look
for a more long term solution which does not require the encoding to be
changed back and forth with each imap execution.
If only someone had told me at the beginning not to use ascii > 127
characters!! I think in the next major rev, we will have to undertake a
major overhaul of all the macros to not use any of the higher ascii
characters. Maybe modify IMAP() to allow for multiple character placeholder
characters... (maybe '{+' and '+}' like in cream).
This will instantly remove all the internationalization and localization
problems.
Index: imaps.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** imaps.vim 6 Dec 2002 16:20:00 -0000 1.7
--- imaps.vim 7 Dec 2002 00:43:41 -0000 1.8
***************
*** 5,9 ****
" Description: insert mode template expander with cursor placement
" while preserving filetype indentation.
! " Last Change: Mon Dec 02 04:00 AM 2002 PST
"
" Documentation: {{{
--- 5,9 ----
" Description: insert mode template expander with cursor placement
" while preserving filetype indentation.
! " Last Change: Fri Dec 06 04:00 PM 2002 PST
"
" Documentation: {{{
***************
*** 272,276 ****
let s:oldenc = &encoding
! let &encoding='latin1'
let text = a:text
--- 272,278 ----
let s:oldenc = &encoding
! if &encoding != 'latin1'
! let &encoding='latin1'
! endif
let text = a:text
***************
*** 345,349 ****
end
! let &encoding = s:oldenc
return initial.text.movement
--- 347,354 ----
end
!
! if s:oldenc != 'latin1'
! let &encoding = s:oldenc
! endif
return initial.text.movement
***************
*** 358,362 ****
function! IMAP_Jumpfunc()
let s:oldenc = &encoding
! setglobal encoding=latin1
let phs = '«'
--- 363,370 ----
function! IMAP_Jumpfunc()
let s:oldenc = &encoding
! if s:oldenc != 'latin1'
! setglobal encoding=latin1
! endif
!
let phs = '«'
***************
*** 409,413 ****
" Description:
function! RestoreEncoding()
! let &g:encoding = s:oldenc
return ''
endfunction " }}}
--- 417,423 ----
" Description:
function! RestoreEncoding()
! if s:oldenc != 'latin1'
! let &g:encoding = s:oldenc
! endif
return ''
endfunction " }}}
|