From aba1357aa955c1b6dcf2fa29a9898b823b0d021e Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova <jples...@redhat.com> Date: Wed, 21 Jun 2017 14:48:01 +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 13ae910..24fa59d 100644 --- a/perl-Term-Completion.spec +++ b/perl-Term-Completion.spec @@ -1,13 +1,17 @@ Name: perl-Term-Completion Version: 1.00 -Release: 8%{?dist} +Release: 9%{?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(base) BuildRequires: perl(Carp) @@ -34,6 +38,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 @@ -46,7 +51,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 @@ -61,6 +66,10 @@ make test %{_mandir}/man3/*.3* %changelog +* Wed Jun 21 2017 Jitka Plesnikova <jples...@redhat.com> - 1.00-9 +- Fixed handling of spaces and tabs after the end of completed file + (bug #1458244) + * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 1.00-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -- cgit v1.1 https://src.fedoraproject.org/cgit/perl-Term-Completion.git/commit/?h=f24&id=aba1357aa955c1b6dcf2fa29a9898b823b0d021e _______________________________________________ perl-devel mailing list -- perl-devel@lists.fedoraproject.org To unsubscribe send an email to perl-devel-le...@lists.fedoraproject.org