- Call get_shortcut() after getting input, so that we only have
to check for a main shortcut key instead of both it and all of
its equivalents. (DLR)
+ help_init()
+ - If we have at least two entries' worth of blank space, use it
+ to display more of "^Space" and "M-Space". (DLR, suggested by
+ Benno Schulenberg)
- nano.c:
renumber()
- Remove invalid assert. (DLR, found by Filipe Moreira)
/* Yucky sentinel values that we can't handle a better
* way. */
if (s->ctrlval == NANO_CONTROL_SPACE) {
- char *space_ptr = display_string(_("Space"), 0, 6,
+ char *space_ptr = display_string(_("Space"), 0, 13,
FALSE);
+ if (s->funcval == NANO_NO_KEY && (s->metaval ==
+ NANO_NO_KEY || s->miscval == NANO_NO_KEY)) {
+ /* If we're here, we have at least two entries worth
+ * of blank space. If this entry takes up more than
+ * one entry's worth of space, use two to display
+ * it. */
+ if (strlen(space_ptr) + 1 > 7)
+ entries++;
+ } else
+ /* Otherwise, truncate it so that it takes up only
+ * one entry's worth of space. */
+ space_ptr[7] = '\0';
+
ptr += sprintf(ptr, "^%s", space_ptr);
free(space_ptr);
/* Yucky sentinel values that we can't handle a better
* way. */
if (s->metaval == NANO_ALT_SPACE && entries == 1) {
- char *space_ptr = display_string(_("Space"), 0, 5,
+ char *space_ptr = display_string(_("Space"), 0, 13,
FALSE);
+ /* If we're here, we have at least two entries worth of
+ * blank space. If this entry takes up more than one
+ * entry's worth of space, use two to display it. */
+ if (strlen(space_ptr) + 2 > 7)
+ entries++;
+
ptr += sprintf(ptr, "M-%s", space_ptr);
free(space_ptr);