File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -733,22 +733,23 @@ void ffLogoPrintRemaining(void)
733733void ffLogoBuiltinPrint (void )
734734{
735735 FFOptionsLogo * options = & instance .config .logo ;
736+ options -> position = FF_LOGO_POSITION_TOP ;
737+ options -> paddingRight = 2 ; // empty line after logo printing
738+ FF_STRBUF_AUTO_DESTROY buf = ffStrbufCreate ();
736739
737740 for (uint8_t ch = 0 ; ch < 26 ; ++ ch )
738741 {
739742 for (const FFlogo * logo = ffLogoBuiltins [ch ]; * logo -> names ; ++ logo )
740743 {
741- printf ("\033[%sm%s:\033[0m\n" , logo -> colors [0 ], logo -> names [0 ]);
744+ if (instance .config .display .pipe )
745+ ffStrbufSetF (& buf , "%s:\n" , logo -> names [0 ]);
746+ else
747+ ffStrbufSetF (& buf , "\e[%sm%s:\e[0m\n" , logo -> colors [0 ], logo -> names [0 ]);
748+ ffWriteFDBuffer (FFUnixFD2NativeFD (STDOUT_FILENO ), & buf );
742749 logoPrintStruct (logo );
743- ffLogoPrintRemaining ();
744750
745- //reset everything
746- instance .state .logoHeight = 0 ;
747- instance .state .keysHeight = 0 ;
748751 for (uint8_t i = 0 ; i < FASTFETCH_LOGO_MAX_COLORS ; i ++ )
749752 ffStrbufClear (& options -> colors [i ]);
750-
751- putchar ('\n' );
752753 }
753754 }
754755}
You can’t perform that action at this time.
0 commit comments