]> git.lyx.org Git - lyx.git/commitdiff
lyxpaperview: take the first match
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 27 Aug 2020 10:05:49 +0000 (12:05 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 27 Aug 2020 10:05:49 +0000 (12:05 +0200)
lib/scripts/lyxpaperview.py

index f62c5ea9a3e18b3f89e9d42726a52aab2d4fd810..09256da7cbdedcb4bec0b5ce7bbbb447d9bee18a 100755 (executable)
@@ -84,7 +84,7 @@ def find(args, path):
                    # have this already
                    continue
                px = subprocess.Popen(['grep', '-i', arg], stdin=px.stdout, stdout=subprocess.PIPE)
-            p4 = subprocess.Popen(['head', '-n 2'], stdin=px.stdout, stdout=subprocess.PIPE)
+            p4 = subprocess.Popen(['head', '-n 1'], stdin=px.stdout, stdout=subprocess.PIPE)
             p1.stdout.close()
             output = p4.communicate()
             return output[0].decode("utf8")[:-1]# strip trailing '\n'