This commit is contained in:
parent
f2fd31264d
commit
6e32c032d0
69
less-406-save_line_position.patch
Normal file
69
less-406-save_line_position.patch
Normal file
@ -0,0 +1,69 @@
|
||||
--- line.c
|
||||
+++ line.c
|
||||
@@ -68,6 +68,25 @@
|
||||
static int mbc_buf_index = 0;
|
||||
static POSITION mbc_pos;
|
||||
|
||||
+
|
||||
+
|
||||
+/* Following define alters the "-r" switch to not throw
|
||||
+ * away location information, but keep location as well
|
||||
+ * as "possible" (currently only interpreting location escape
|
||||
+ * sequences
|
||||
+ *
|
||||
+ * This benefits the user who may be operating with "-r" but
|
||||
+ * is still displaying predominantly "normal" spacing characters
|
||||
+ * (especially single, 8-bit characters that print "normally"
|
||||
+ * but might otherwise be "undisplayable" in non "-r" mode.
|
||||
+ *
|
||||
+ * This is especially true using extended European characters
|
||||
+ * that might be present in UTF-8 docs (among others);
|
||||
+ * - lawless@tlinx.org
|
||||
+ */
|
||||
+#define THROW_AWAY_LOCATION 0
|
||||
+
|
||||
+
|
||||
/*
|
||||
* Initialize from environment variables.
|
||||
*/
|
||||
@@ -620,7 +639,11 @@
|
||||
w = pwidth(ch, a, prev_ch);
|
||||
}
|
||||
|
||||
- if (ctldisp != OPT_ON && column + w + attr_ewidth(a) > sc_width)
|
||||
+ if (
|
||||
+#if THROW_AWAY_LOCATION
|
||||
+ ctldisp != OPT_ON &&
|
||||
+#endif
|
||||
+ column + w + attr_ewidth(a) > sc_width)
|
||||
/*
|
||||
* Won't fit on screen.
|
||||
*/
|
||||
@@ -952,7 +975,11 @@
|
||||
{
|
||||
STORE_PRCHAR((char) ch, pos);
|
||||
}
|
||||
- } else if (utf_mode && ctldisp != OPT_ON && is_ubin_char(ch))
|
||||
+ } else if (utf_mode &&
|
||||
+#if THROW_AWAY_LOCATION
|
||||
+ ctldisp != OPT_ON &&
|
||||
+#endif
|
||||
+ is_ubin_char(ch))
|
||||
{
|
||||
char *s;
|
||||
|
||||
@@ -1038,9 +1065,12 @@
|
||||
* that blank line would be ignored!)
|
||||
*/
|
||||
if (!oldbot)
|
||||
- nl = (column < sc_width || !auto_wrap || (endline && ignaw) || ctldisp == OPT_ON);
|
||||
+ nl = (column < sc_width || !auto_wrap || (endline && ignaw));
|
||||
else
|
||||
- nl = (column < sc_width || !auto_wrap || ignaw || ctldisp == OPT_ON);
|
||||
+ nl = (column < sc_width || !auto_wrap || ignaw);
|
||||
+#if THROW_AWAY_LOCATION
|
||||
+ nl = nl || ctldisp == OPT_ON;
|
||||
+#endif
|
||||
if (nl)
|
||||
{
|
||||
linebuf[curr] = '\n';
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 17 10:23:08 CEST 2007 - anosek@suse.cz
|
||||
|
||||
- fixed Incorrect behaviour of -r parameter [#244791]
|
||||
(save_line_position.patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 27 10:25:23 CEST 2007 - anosek@suse.cz
|
||||
|
||||
|
@ -21,7 +21,7 @@ Provides: normal-less jless
|
||||
Requires: file
|
||||
Autoreqprov: on
|
||||
Version: 406
|
||||
Release: 1
|
||||
Release: 7
|
||||
Summary: Text File Browser and Pager Similar to more
|
||||
URL: http://www.greenwoodsoftware.com/less/
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
@ -36,6 +36,7 @@ Patch23: %{name}-%{version}-mouse.patch
|
||||
Patch24: %{name}-%{version}-terminate.patch
|
||||
Patch25: %{name}-%{version}-widechars.patch
|
||||
Patch26: %{name}-%{version}-shell.patch
|
||||
Patch27: %{name}-%{version}-save_line_position.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -59,6 +60,7 @@ Authors:
|
||||
%patch24
|
||||
%patch25
|
||||
%patch26
|
||||
%patch27
|
||||
#
|
||||
# the ./configure script is not writable for the normal user
|
||||
# rather fix permissions for all files
|
||||
@ -104,6 +106,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{prefix}/bin/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 17 2007 - anosek@suse.cz
|
||||
- fixed Incorrect behaviour of -r parameter [#244791]
|
||||
(save_line_position.patch)
|
||||
* Fri Jul 27 2007 - anosek@suse.cz
|
||||
- updated to version 406
|
||||
* Allow decimal point in number for %% (percent) command.
|
||||
|
Loading…
x
Reference in New Issue
Block a user