From 00a66dffa15f00e3b07058c18251db049a155dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 16 May 2017 10:03:03 +0800 Subject: [PATCH] Fixed the documentation of find_doc() to describe the real rules. --- bin/obasync | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/obasync b/bin/obasync index 3be9247..77c815f 100755 --- a/bin/obasync +++ b/bin/obasync @@ -295,11 +295,10 @@ def find_doc(oo, target): target: A partial path of the document. Returns: - If there is only one opened document, it is returned. If - there are more than one opened document, the document whose - file path matches the "target" is returned. Otherwise, if - no matching document or more than one matching document are - found, the program exists with an error. + If there is only one opened document that matches the + target, it is returned. If the target is not specified, + but there is only one opened document, it is returned. + Otherwise, the program exits with an error. """ # Checks the opened documents enum = oo.desktop.getComponents().createEnumeration()