updated for version 7.0177
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 508c563..335f2a4 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2765,9 +2765,17 @@
     regname = may_get_selection(regname);
 #endif
 
-    /* Need to save and restore ccline. */
+    /* Need to save and restore ccline.  And go into the sandbox to avoid
+     * nasty things like going to another buffer when evaluating an
+     * expression. */
     save_cmdline(&save_ccline);
+#ifdef HAVE_SANDBOX
+    ++sandbox;
+#endif
     i = get_spec_reg(regname, &arg, &allocated, TRUE);
+#ifdef HAVE_SANDBOX
+    --sandbox;
+#endif
     restore_cmdline(&save_ccline);
 
     if (i)