Fix ranger-next-parent/ranger-prev-parent when there is no parent
In a deer session or in a ranger session in the root directory, there is no parent directory. ranger-next-parent and ranger-prev-parent do not check for this condition. Consequently, pressing [ or ] would cause the following error in these contexts:
Wrong type argument: stringp, nil
This commit adds the needed check.
ranger.el (ranger-next-parent): Fix doc string.
(ranger-next-parent, ranger-prev-parent): Check if there is a parent directory buffer before trying to use it, proceed normally if there is, and print a message if there is not.
Fix
ranger-next-parent
/ranger-prev-parent
when there is no parentIn a deer session or in a ranger session in the root directory, there is no parent directory.
ranger-next-parent
andranger-prev-parent
do not check for this condition. Consequently, pressing[
or]
would cause the following error in these contexts:This commit adds the needed check.
ranger.el
(ranger-next-parent
): Fix doc string. (ranger-next-parent
,ranger-prev-parent
): Check if there is a parent directory buffer before trying to use it, proceed normally if there is, and print a message if there is not.