mc: fix for a strange bug in mcedit
This commit is contained in:
parent
9bc3391df5
commit
c0b7c1c13a
@ -1 +1,2 @@
|
||||
f1e282124ee27fda4785364d47918fb2 mc-4.8.5.tar.xz
|
||||
b7b2c35371a6c963fe2e59f9b71d3161 mcedit.diff
|
||||
|
@ -5,12 +5,15 @@
|
||||
|
||||
name=mc
|
||||
version=4.8.5
|
||||
release=1
|
||||
source=(http://www.midnight-commander.org/downloads/$name-$version.tar.xz)
|
||||
release=2
|
||||
source=(http://www.midnight-commander.org/downloads/$name-$version.tar.xz
|
||||
mcedit.diff)
|
||||
|
||||
build () {
|
||||
cd $name-$version
|
||||
|
||||
patch -p0 -i $SRC/mcedit.diff
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--mandir=/usr/man \
|
||||
--libexecdir=/usr/lib \
|
||||
|
26
mc/mcedit.diff
Normal file
26
mc/mcedit.diff
Normal file
@ -0,0 +1,26 @@
|
||||
# https://www.midnight-commander.org/changeset/28cd54da5a73e6d722bd0534e3f43baedb398cea#file0
|
||||
|
||||
Index: src/editor/edit.c
|
||||
===================================================================
|
||||
--- src/editor/edit.c (revision b4a10d82cc50bd55f91d98b31497df7021e731f3)
|
||||
+++ src/editor/edit.c (revision 28cd54da5a73e6d722bd0534e3f43baedb398cea)
|
||||
@@ -3074,14 +3074,13 @@
|
||||
#endif
|
||||
|
||||
+ if (c == '\n')
|
||||
+ return (upto != 0 ? (off_t) col : p);
|
||||
if (c == '\t')
|
||||
col += TAB_SIZE - col % TAB_SIZE;
|
||||
- else if (c == '\n')
|
||||
- return (upto != 0 ? (off_t) col : p);
|
||||
-
|
||||
- if ((c < 32 || c == 127) && (orig_c == c
|
||||
+ else if ((c < 32 || c == 127) && (orig_c == c
|
||||
#ifdef HAVE_CHARSET
|
||||
- || (!mc_global.utf8_display && !edit->utf8)
|
||||
+ || (!mc_global.utf8_display && !edit->utf8)
|
||||
#endif
|
||||
- ))
|
||||
+ ))
|
||||
/* '\r' is shown as ^M, so we must advance 2 characters */
|
||||
/* Caret notation for control characters */
|
Loading…
x
Reference in New Issue
Block a user