https://github.com/sergev/le-editor/commit/f5582ae199e4c4b80d32e4764715d630203b44f6

Index: src/format.cc
--- src/format.cc.orig
+++ src/format.cc
@@ -44,7 +44,7 @@ void  FormatPara()
    num   bcol,ncol;
    int   i;
 
-   if(hex || View || buffer_mmapped) /* formatting is not allowed in those modes */
+   if(in_hex_mode || View || buffer_mmapped) /* formatting is not allowed in those modes */
       return;
 
    flag=1;
@@ -280,7 +280,7 @@ void  FormatAll()
    {" &Cancel ",MIDDLE+6,FDOWN-2},
    {NULL}};
 
-   if(hex || View)
+   if(in_hex_mode || View)
       return;
 
    char *message=(char*)alloca(80);
@@ -306,7 +306,7 @@ void  FormatAll()
 void  CenterLine()
 {
    num shift;
-   if(hex || View)
+   if(in_hex_mode || View)
       return;
    flag=REDISPLAY_LINE;
    ToLineBegin();
@@ -331,7 +331,7 @@ void  CenterLine()
 void  ShiftRightLine()
 {
    num shift;
-   if(hex || View)
+   if(in_hex_mode || View)
       return;
    flag=REDISPLAY_LINE;
    ToLineBegin();
@@ -357,7 +357,7 @@ void  FormatFunc()
 {
    int   action;
 
-   if(hex || View)
+   if(in_hex_mode || View)
       return;
    ToLineBegin();
    SetStdCol();
