From 61330c1e59290b6ce659280c326c648601a6c2a7 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <[email protected]>
Date: Wed, 21 Jun 2017 14:38:31 +0200
Subject: Fixed handling of spaces and tabs after the end of completed file
(bug #1458244)
---
Term-Completion-1.00-Fix-handling-of-spaces-and-tabs.patch | 11 +++++++++++
perl-Term-Completion.spec | 13 +++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 Term-Completion-1.00-Fix-handling-of-spaces-and-tabs.patch
diff --git a/Term-Completion-1.00-Fix-handling-of-spaces-and-tabs.patch
b/Term-Completion-1.00-Fix-handling-of-spaces-and-tabs.patch
new file mode 100644
index 0000000..911aa65
--- /dev/null
+++ b/Term-Completion-1.00-Fix-handling-of-spaces-and-tabs.patch
@@ -0,0 +1,11 @@
+--- a/lib/Term/Completion.pm 2013-02-23 16:39:15.000000000 +0100
++++ b/lib/Term/Completion.pm 2017-06-02 12:34:12.792097566 +0200
+@@ -203,7 +203,7 @@ sub complete
+ }
+ }
+ my $add = $l - $r;
+- if($add) {
++ if($add > 0) {
+ $this->{out}->print($test = substr($test, $r, $add));
+ # reset counter if something was added
+ $tab_pressed = 0;
diff --git a/perl-Term-Completion.spec b/perl-Term-Completion.spec
index cd5c508..fe07c70 100644
--- a/perl-Term-Completion.spec
+++ b/perl-Term-Completion.spec
@@ -1,13 +1,17 @@
Name: perl-Term-Completion
Version: 1.00
-Release: 9%{?dist}
+Release: 10%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries
Summary: Read one line of user input, with convenience functions
Source:
http://search.cpan.org/CPAN/authors/id/M/MA/MAREKR/Term-Completion-%{version}.tar.gz
Url: http://search.cpan.org/dist/Term-Completion
+# Fixed handling of spaces and tabs after the end of completed file (CPAN
RT#121992)
+Patch0: Term-Completion-1.00-Fix-handling-of-spaces-and-tabs.patch
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
BuildArch: noarch
+BuildRequires: findutils
+BuildRequires: make
BuildRequires: perl
BuildRequires: perl-generators
BuildRequires: perl(base)
@@ -35,6 +39,7 @@ of input, submitting the answer by pressing the ENTER key.
%prep
%setup -q -n Term-Completion-%{version}
+%patch0 -p1
find . -type f -exec chmod -c -x {} \;
perl -pi -e 's|^#!/opt/perl_5.8.8/bin/perl|#!%{__perl}|' devel/tget.pl
for file in README Changes devel/*; do
@@ -47,7 +52,7 @@ make %{?_smp_mflags}
%install
make pure_install DESTDIR=%{buildroot}
-find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -type f -name .packlist -delete
%{_fixperms} %{buildroot}/*
%check
@@ -62,6 +67,10 @@ make test
%{_mandir}/man3/*.3*
%changelog
+* Wed Jun 21 2017 Jitka Plesnikova <[email protected]> - 1.00-10
+- Fixed handling of spaces and tabs after the end of completed file
+ (bug #1458244)
+
* Sun May 15 2016 Jitka Plesnikova <[email protected]> - 1.00-9
- Perl 5.24 rebuild
--
cgit v1.1
https://src.fedoraproject.org/cgit/perl-Term-Completion.git/commit/?h=f25&id=61330c1e59290b6ce659280c326c648601a6c2a7
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]