diff --git a/mc/.md5sum b/mc/.md5sum index 5edb4eebe..b7ccdec02 100644 --- a/mc/.md5sum +++ b/mc/.md5sum @@ -1 +1,2 @@ f1e282124ee27fda4785364d47918fb2 mc-4.8.5.tar.xz +b7b2c35371a6c963fe2e59f9b71d3161 mcedit.diff diff --git a/mc/Pkgfile b/mc/Pkgfile index 05b07ff30..a1114d911 100644 --- a/mc/Pkgfile +++ b/mc/Pkgfile @@ -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 \ diff --git a/mc/mcedit.diff b/mc/mcedit.diff new file mode 100644 index 000000000..ea8925f59 --- /dev/null +++ b/mc/mcedit.diff @@ -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 */