From 777dc5cb7474610d5916a57d19e3ccfc9bca7e59 Mon Sep 17 00:00:00 2001 From: arthur barraux Date: Sat, 23 May 2026 15:44:05 +0200 Subject: [PATCH] Version update --- assets/beluga.txt | 72 +++++++++++++++++++++++------------------------ include/define.h | 2 +- src/buffer.c | 3 +- 3 files changed, 39 insertions(+), 38 deletions(-) diff --git a/assets/beluga.txt b/assets/beluga.txt index 0d2a3fe..2a9b8df 100644 --- a/assets/beluga.txt +++ b/assets/beluga.txt @@ -1,43 +1,43 @@ **#%#*****###%** - *##+--------------------=##* - #*=----------------------------=*#* - #*------------------------------------*# - %+----------------------------------------=#* - #+---------------------------------------------## - *#-------------------------------------------------=## + *##+--------------------=##* + #*=----------------------------=*#* + #*------------------------------------*# + %+----------------------------------------=#* + #+---------------------------------------------## + *#-------------------------------------------------=## *#----------------------------------------------------:-## - #----------------------------------------------------------## - #=--------------------------------------------------------------## - +--------------------------+@#-%*-----------------------------------#* - +--------------------------%@@@@#-------------------------------------** BELUGA - VERSION 2.3 + #----------------------------------------------------------## + #=--------------------------------------------------------------## + +--------------------------+@#-%*-----------------------------------#* + +--------------------------%@@@@#-------------------------------------** BELUGA - VERSION 2.4 *-=-------------------------#@@*---------------------------------------=% %*#==--------------------------------------------------------------------+# ----- KEY-BINDS ----- *%%=-=--------------------------------------------------------------------=# CTRL-x CTRL-c leave %=--------------------------------------------------------------------------#* CTRL-x CTRL-s save %-----------------------------------------------------------------------------** CTRL-x f open-file -*+--=---===----=---------------=*-----------------------------------------------** - #--=## *#%#*+==----==+**+----------------------= ***=---------------------% - *%**=-----------==== ==---------------------------------=+#+-----------------=# - *%=----------------------------------------------------------=#*---------------# - ##=----------------------------------=------------------------+%=------------+# - #%+---------------------------------=*------------------------+%------------# - *#%*=-------------=-----------------#-------------------------#+----------# - **#%#*******+=======-------------#=------------------------#----------# - #===#*=======------------------#*----=-----------=--=##*-----------# - -====##=------------------------*%+------------=*#+=====----------# - --=====+#*=----------------------=-=+*#####***+=======-----------=* - %------=====*%*=-------------------------========-----------------+* - *-=--------====%%###+=--------------------------=-----------------# - #-----------=% +*##%%%%%%@@%%%%####*==---------------------** - %=-------#* #%*=-----------------+# - *%+--=## ##=-----------------=#* - ** #+----=-------------------#* - %+----------------------------#* - *%-------------==----------------+# - ##--------------==------------------# - *#--------------===%-----------------=% - ##---------------=-##*-----------------+# - *#---------------==#+=#%-----------------% - *%---------------+# %*---------------#* - *#------------=+#* #%*=-----------#* - #****##****** *#%%##+=----% +*+--=---===----=---------------=*-----------------------------------------------** + #--=## *#%#*+==----==+**+----------------------= ***=---------------------% + *%**=-----------==== ==---------------------------------=+#+-----------------=# + *%=----------------------------------------------------------=#*---------------# + ##=----------------------------------=------------------------+%=------------+# + #%+---------------------------------=*------------------------+%------------# + *#%*=-------------=-----------------#-------------------------#+----------# + **#%#*******+=======-------------#=------------------------#----------# + #===#*=======------------------#*----=-----------=--=##*-----------# + -====##=------------------------*%+------------=*#+=====----------# + --=====+#*=----------------------=-=+*#####***+=======-----------=* + %------=====*%*=-------------------------========-----------------+* + *-=--------====%%###+=--------------------------=-----------------# + #-----------=% +*##%%%%%%@@%%%%####*==---------------------** + %=-------#* #%*=-----------------+# + *%+--=## ##=-----------------=#* + ** #+----=-------------------#* + %+----------------------------#* + *%-------------==----------------+# + ##--------------==------------------# + *#--------------===%-----------------=% + ##---------------=-##*-----------------+# + *#---------------==#+=#%-----------------% + *%---------------+# %*---------------#* + *#------------=+#* #%*=-----------#* + #****##****** *#%%##+=----% diff --git a/include/define.h b/include/define.h index 0a931c0..e31da55 100644 --- a/include/define.h +++ b/include/define.h @@ -27,6 +27,6 @@ enum editorKey_e { #define ABUF_INIT {NULL, 0} -#define BELUGA_VERSION "1.1" +#define BELUGA_VERSION "2.4" #endif // DEFINE_H_ diff --git a/src/buffer.c b/src/buffer.c index 6e8c917..dd4b099 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "include/input.h" @@ -79,7 +80,7 @@ int bufferCreate(const char* filename, enum bufferStatus_e state) new_buf->buffer_id = E.number_of_buffer; new_buf->filename = strdup(filename); new_buf->type = FILE_BUFF; - new_buf->state = READ_AND_WRITE; + new_buf->state = state; new_buf->x = 0; new_buf->y = 0; new_buf->dirty = 0; // New file starts clean