Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
36df5cee
Commit
36df5cee
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
browser: make Ctrl+Left and Ctrl+Right jump to left and right column
parent
3d829867
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/browser.c
+6
-0
src/browser.c
src/global.c
+7
-0
src/global.c
with
13 additions
and
0 deletions
+13
-0
src/browser.c
View file @
36df5cee
...
...
@@ -264,6 +264,12 @@ char *do_browser(char *path, DIR *dir)
}
else
if
(
func
==
do_down_void
)
{
if
(
selected
+
width
<=
filelist_len
-
1
)
selected
+=
width
;
}
else
if
(
func
==
do_prev_word_void
)
{
selected
-=
(
selected
%
width
);
}
else
if
(
func
==
do_next_word_void
)
{
selected
+=
width
-
1
-
(
selected
%
width
);
if
(
selected
>=
filelist_len
)
selected
=
filelist_len
-
1
;
}
else
if
(
func
==
do_left
)
{
if
(
selected
>
0
)
selected
--
;
...
...
This diff is collapsed.
Click to expand it.
src/global.c
View file @
36df5cee
...
...
@@ -529,6 +529,8 @@ void shortcut_init(void)
#ifndef DISABLE_BROWSER
const
char
*
nano_browser_whereis_msg
=
N_
(
"Search for a string"
);
const
char
*
nano_browser_refresh_msg
=
N_
(
"Refresh the file list"
);
const
char
*
nano_browser_lefthand_msg
=
N_
(
"Go to lefthand column"
);
const
char
*
nano_browser_righthand_msg
=
N_
(
"Go to righthand column"
);
#endif
const
char
*
nano_prevpage_msg
=
N_
(
"Go one screenful up"
);
const
char
*
nano_nextpage_msg
=
N_
(
"Go one screenful down"
);
...
...
@@ -1021,6 +1023,11 @@ void shortcut_init(void)
#ifndef DISABLE_BROWSER
add_to_funcs
(
total_refresh
,
MBROWSER
,
refresh_tag
,
IFSCHELP
(
nano_browser_refresh_msg
),
BLANKAFTER
,
VIEW
);
add_to_funcs
(
do_prev_word_void
,
MBROWSER
,
N_
(
"Left Column"
),
IFSCHELP
(
nano_browser_lefthand_msg
),
TOGETHER
,
VIEW
);
add_to_funcs
(
do_next_word_void
,
MBROWSER
,
N_
(
"Right Column"
),
IFSCHELP
(
nano_browser_righthand_msg
),
BLANKAFTER
,
VIEW
);
#endif
#ifndef DISABLE_COLOR
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help