[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs qe.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs qe.c |
Date: |
Sat, 30 Nov 2013 12:12:42 +0000 |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 13/11/30 12:12:42
Modified files:
. : qe.c
Log message:
added feedback for change-directory command
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.99&r2=1.100
Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- qe.c 28 Nov 2013 15:52:39 -0000 1.99
+++ qe.c 30 Nov 2013 12:12:40 -0000 1.100
@@ -2,7 +2,7 @@
* QEmacs, tiny but powerful multimode editor
*
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard.
- * Copyright (c) 2000-2008 Charlie Gordon.
+ * Copyright (c) 2000-2013 Charlie Gordon.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -368,11 +368,16 @@
do_previous_window(s);
}
-void do_cd(__unused__ EditState *s, const char *name)
+void do_cd(EditState *s, const char *name)
{
- chdir(name);
- /* CG: Should issue diagnostics upon failure */
- /* CG: Should display current directory after chdir */
+ char buf[MAX_FILENAME_SIZE];
+
+ if (chdir(name)) {
+ put_status(s, "Cannot change directory to '%s'", name);
+ } else {
+ getcwd(buf, sizeof(buf));
+ put_status(s, "Current directory: %s", buf);
+ }
}
/* basic editing functions */