diff --git a/ChangeLog b/ChangeLog
index 22a071ea18d7946fe506a644890e0350e8fda558..c240c1cd795277b397b03813b7778b1ba2aedcd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,7 +16,9 @@ CVS code -
 	- Add the ability to open a file on a specified column as well
 	  as a specified line, by allowing an argument of the form
 	  +LINE,COLUMN.  New function parse_line_column(); changes to
-	  main(), nano.1, and nano.texi. (DLR, suggested by PFTank)
+	  main(), do_gotoline() (renamed do_gotolinecolumn()),
+	  do_gotoline_void() (renamed do_gotolinecolumn_void()), nano.1,
+	  and nano.texi. (DLR, suggested by PFTank)
 - cut.c:
   cut_line()
 	- Set placewewant properly after cutting a line, to avoid a
diff --git a/src/global.c b/src/global.c
index f2a457619f79b4cff44c5291e3eb20e04afb5164..aeaf7b745d797e0541cbb603e63e1c4a1fc624be 100644
--- a/src/global.c
+++ b/src/global.c
@@ -480,7 +480,8 @@ void shortcut_init(bool unjustify)
 
     sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
 	IFHELP(nano_gotoline_msg, NANO_GOTOLINE_ALTKEY),
-	NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW, do_gotoline_void);
+	NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW,
+	do_gotolinecolumn_void);
 
     sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg,
 	IFHELP(nano_replace_msg, NANO_ALT_REPLACE_KEY),
diff --git a/src/nano.c b/src/nano.c
index c3869d647bcab38756adf361388e11ebba66732c..bb4e9ce8a2d7f581677780a6a38698b6e89fea10 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -4446,18 +4446,15 @@ int main(int argc, char **argv)
 	     * followed by at least one other argument, the filename it
 	     * applies to. */
 	    if (i < argc - 1 && argv[i][0] == '+' && iline == 1 &&
-		icol == 1) {
+		icol == 1)
 		parse_line_column(&argv[i][1], &iline, &icol);
-	    } else {
+	    else {
 		load_buffer(argv[i]);
 
-		if (iline > 1) {
-		    do_gotoline(iline, FALSE);
+		if (iline > 1 || icol > 1) {
+		    do_gotolinecolumn(iline, icol - 1, FALSE, FALSE,
+			FALSE);
 		    iline = 1;
-		}
-
-		if (icol > 1) {
-		    current_x = actual_x(current->data, icol - 1);
 		    icol = 1;
 		}
 	    }
@@ -4498,11 +4495,8 @@ int main(int argc, char **argv)
     titlebar(NULL);
     display_main_list();
 
-    if (startline > 1)
-	do_gotoline(startline, FALSE);
-
-    if (startcol > 1)
-	current_x = actual_x(current->data, startcol - 1);
+    if (startline > 1 || startcol > 1)
+	do_gotolinecolumn(startline, startcol, FALSE, FALSE, FALSE);
 
 #ifndef NANO_SMALL
     /* Return here after a SIGWINCH. */
diff --git a/src/proto.h b/src/proto.h
index b6430ad7fd4b84a43817a6955742ce44064a9049..9cde7e68726498168e72d0a1a797a4c95a3e016a 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -516,8 +516,9 @@ ssize_t do_replace_loop(const char *needle, const filestruct
 	*real_current, size_t *real_current_x, bool wholewords, bool
 	*canceled);
 void do_replace(void);
-void do_gotoline(int line, bool save_pos);
-void do_gotoline_void(void);
+void do_gotolinecolumn(int line, ssize_t column, bool use_answer, bool
+	interactive, bool save_pos);
+void do_gotolinecolumn_void(void);
 #if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
 void do_gotopos(int line, size_t pos_x, int pos_y, size_t pos_pww);
 #endif
diff --git a/src/search.c b/src/search.c
index 0d2040d6a9dc55614131da8468226192303f638b..d52165c3e7474baac5090a44ccc9069d4e112ac7 100644
--- a/src/search.c
+++ b/src/search.c
@@ -255,9 +255,9 @@ int search_init(bool replacing, bool use_answer)
 #ifndef NANO_SMALL
 		search_history.current = search_history.next;
 #endif
-		do_gotoline(-1, FALSE);	/* Put answer up on the
-					 * statusbar and fall
-					 * through. */
+		do_gotolinecolumn(1, 1, TRUE, TRUE, FALSE);
+				/* Put answer up on the statusbar and
+				 * fall through. */
 	    default:
 		return -1;
 	}
@@ -969,11 +969,12 @@ void do_replace(void)
     replace_abort();
 }
 
-void do_gotoline(int line, bool save_pos)
+void do_gotolinecolumn(int line, ssize_t column, bool use_answer, bool
+	interactive, bool save_pos)
 {
-    if (line <= 0) {		/* Ask for it. */
+    if (interactive) {		/* Ask for it. */
 	char *ans = mallocstrcpy(NULL, answer);
-	int i = statusq(FALSE, gotoline_list, line < 0 ? ans : "",
+	int i = statusq(FALSE, gotoline_list, use_answer ? ans : "",
 #ifndef NANO_SMALL
 		NULL,
 #endif
@@ -998,12 +999,19 @@ void do_gotoline(int line, bool save_pos)
 
 	/* Do a bounds check.  Display a warning on an out-of-bounds
 	 * line number only if we hit Enter at the statusbar prompt. */
-	if (!parse_num(answer, &line) || line < 1) {
+	if (!parse_line_column(answer, &line, &column) || line < 1 ||
+		column < 1) {
 	    if (i == 0)
 		statusbar(_("Come on, be reasonable"));
 	    display_main_list();
 	    return;
 	}
+    } else {
+	if (line < 1)
+	    line = 1;
+
+	if (column < 1)
+	    column = 1;
     }
 
     if (current->lineno > line) {
@@ -1016,33 +1024,28 @@ void do_gotoline(int line, bool save_pos)
 	    ;
     }
 
-    current_x = 0;
+    current_x = actual_x(current->data, column - 1);
 
     /* If save_pos is TRUE, don't change the cursor position when
      * updating the edit window. */
     edit_update(save_pos ? NONE : CENTER);
 
-    placewewant = 0;
+    placewewant = xplustabs();
     display_main_list();
 }
 
-void do_gotoline_void(void)
+void do_gotolinecolumn_void(void)
 {
-    do_gotoline(0, FALSE);
+    do_gotolinecolumn(1, 1, FALSE, TRUE, FALSE);
 }
 
 #if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
 void do_gotopos(int line, size_t pos_x, int pos_y, size_t pos_pww)
 {
-    /* Since do_gotoline() resets the x-coordinate but not the
+    /* Since do_gotolinecolumn() resets the x-coordinate but not the
      * y-coordinate, set the coordinates up this way. */
     current_y = pos_y;
-    do_gotoline(line, TRUE);
-
-    /* Make sure that the x-coordinate is sane here. */
-    current_x = strlen(current->data);
-    if (pos_x < current_x)
-	current_x = pos_x;
+    do_gotolinecolumn(line, pos_x, FALSE, FALSE, TRUE);
 
     /* Set the rest of the coordinates up. */
     placewewant = pos_pww;
diff --git a/src/utils.c b/src/utils.c
index 6a016d221461e5fd3ee3d1e4a05fcf3986ebdf06..c2ca4356c4f13635fb18ae5887dac4184c21faf8 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -124,9 +124,10 @@ bool parse_line_column(const char *str, int *line, ssize_t *column)
 
     if (line != NULL) {
 	if (comma != NULL) {
-	    char *str_line = mallocstrncpy(NULL, str, comma - str);
+	    char *str_line = mallocstrncpy(NULL, str, comma - str + 1);
+	    str_line[comma - str] = '\0';
 
-	    if (!parse_num(str_line, line))
+	    if (str_line[0] != '\0' && !parse_num(str_line, line))
 		retval = FALSE;
 
 	    free(str_line);
@@ -358,7 +359,8 @@ char *mallocstrncpy(char *dest, const char *src, size_t n)
  * "dest = mallocstrcpy(dest, src);". */
 char *mallocstrcpy(char *dest, const char *src)
 {
-    return mallocstrncpy(dest, src, src == NULL ? 1 : strlen(src) + 1);
+    return mallocstrncpy(dest, src, (src == NULL) ? 1 :
+	strlen(src) + 1);
 }
 
 /* Free the malloc()ed string at dest and return the malloc()ed string