Created
September 13, 2012 11:24
-
-
Save afh/3713687 to your computer and use it in GitHub Desktop.
urlview patches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/urlview.c b/urlview.c | |
| index f23d47f..b0fc63f 100644 | |
| --- a/urlview.c | |
| +++ b/urlview.c | |
| @@ -369,7 +369,7 @@ into a line of its own in your \n\ | |
| cbreak (); | |
| noecho (); | |
| #ifdef HAVE_CURS_SET | |
| - curs_set (1); | |
| + curs_set (0); | |
| #endif | |
| keypad (stdscr, TRUE); | |
| @@ -498,6 +498,9 @@ into a line of its own in your \n\ | |
| case '\r': | |
| case KEY_ENTER: | |
| case ' ': | |
| +#ifdef HAVE_CURS_SET | |
| + curs_set (1); | |
| +#endif | |
| strncpy (buf, url[current], sizeof (buf)); | |
| buf[sizeof (buf) - 1] = 0; | |
| mvaddstr (LINES - 1, 0, "URL: "); | |
| @@ -516,6 +519,9 @@ into a line of its own in your \n\ | |
| } | |
| move (LINES - 1, 0); | |
| clrtoeol (); | |
| +#ifdef HAVE_CURS_SET | |
| + curs_set (0); | |
| +#endif | |
| break; | |
| case '0': | |
| case '1': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/urlview.c b/urlview.c | |
| index 9281bbb..9a3b59c 100644 | |
| --- a/urlview.c | |
| +++ b/urlview.c | |
| @@ -39,6 +39,7 @@ | |
| #include <stdlib.h> | |
| #include <fcntl.h> | |
| #include <sys/stat.h> | |
| +#include <locale.h> | |
| #ifdef HAVE_REGEX_H | |
| #include <regex.h> | |
| @@ -411,6 +412,7 @@ into a line of its own in your \n\ | |
| current = urlcount - 1; | |
| /*** present the URLs to the user ***/ | |
| + setlocale(LC_ALL, ""); | |
| #ifdef USE_SLANG | |
| if (reopen_tty) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment