summaryrefslogtreecommitdiffstats
path: root/src/c_init.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-10-06 17:10:33 +0200
committersalad <fmoenne-@student.le-101.fr>2020-10-06 17:10:33 +0200
commitf2c93fb7f2e5b82388dd8d45d63f380906fed04e (patch)
treefb3ebc675f184cea32d2e97c2215675f5cdd6f3c /src/c_init.c
parentsome changes, need MORE (diff)
download42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.gz
42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.bz2
42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.xz
42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.tar.zst
42-minishell-f2c93fb7f2e5b82388dd8d45d63f380906fed04e.zip
C-b + C-f
Diffstat (limited to 'src/c_init.c')
-rw-r--r--src/c_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c_init.c b/src/c_init.c
index de10dfa..745fad9 100644
--- a/src/c_init.c
+++ b/src/c_init.c
@@ -65,9 +65,9 @@ c_read_cap(char *buf,
t_caps *tcaps,
t_msh *msh)
{
- if ((*((unsigned int *)buf)) == LEFT_K)
+ if (((*((unsigned int *)buf)) == LEFT_K) || ((*((unsigned int *)buf)) == CTRL_B))
return (c_key_left(ft_strlen(msh->ps[tcaps->psx]), tcaps));
- else if ((*((unsigned int *)buf)) == RIGHT_K)
+ else if (((*((unsigned int *)buf)) == RIGHT_K) || ((*((unsigned int *)buf)) == CTRL_F))
return (c_key_right(ft_strlen(line), ft_strlen(msh->ps[tcaps->psx]), tcaps));
else if ((*((unsigned int *)buf)) == HOME_K)
return (c_home_key(tcaps));