diff options
author | axel <axel@liljencrantz.se> | 2006-10-02 02:02:58 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-10-02 02:02:58 +1000 |
commit | 15724d079801df9183d0d86cadfbb7dec5b2821b (patch) | |
tree | f971d85d58390e28fd4e0429badcca584381709b /util.c | |
parent | 2839f5e567e21a15850c3adfa2cc3cd1d7372ea9 (diff) |
First stab at multiline editing
darcs-hash:20061001160258-ac50b-1a760913e64b96e30ff321d7fbe4069ca161cdfe.gz
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -923,16 +923,21 @@ int wcsfilecmp( const wchar_t *a, const wchar_t *b ) } int res = wcsfilecmp( a+1, b+1 ); - switch( abs(res) ) + + if( abs(res) < 2 ) { - case 2: - return res; - default: - if( secondary_diff ) - return secondary_diff>0?1:-1; + /* + No primary difference in rest of string. + Use secondary difference on this element if found. + */ + if( secondary_diff ) + { + return secondary_diff>0?1:-1; + } } - return 0; - + + return res; + } void sb_init( string_buffer_t * b) |