Giter VIP home page Giter VIP logo

text-editor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

text-editor's Issues

Build Failure with SFML 2.5.1 on Fedora 39

Hello,
I just wanted to let you know that I encountered linker errors when compiling your project on Fedora 39 using manually installed SFML 2.5.1 (See below for the error message).

Switching to SFML 2.6.1 and updating the Makefile and run.sh for version 2.6.1 fixed the compilation issues.



Error Message:
(I removed -Werror from the Makefile)

> /text-editor/ $ make
g++ -O2 -march=native -Wall -Wextra -pedantic -std=c++23 -L /usr/local/lib/SFML-2.5.1/lib -I /usr/local/lib/SFML-2.5.1/include -MMD -c src/TextDocument.cpp -I src/ -o build/src/TextDocument.o
In file included from /usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.hpp:731,
                 from /usr/local/lib/SFML-2.5.1/include/SFML/System/String.hpp:32,
                 from /usr/local/lib/SFML-2.5.1/include/SFML/System.hpp:42,
                 from /usr/local/lib/SFML-2.5.1/include/SFML/Window.hpp:32,
                 from /usr/local/lib/SFML-2.5.1/include/SFML/Graphics.hpp:32,
                 from src/TextDocument.h:4,
                 from src/TextDocument.cpp:1:
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl: In static member function ‘static In sf::Utf<8>::decode(In, In, sf::Uint32&, sf::Uint32) [with In = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >]’:
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:65:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
   65 |             case 5: output += static_cast<Uint8>(*begin++); output <<= 6;
      |                                                             ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:66:13: note: here
   66 |             case 4: output += static_cast<Uint8>(*begin++); output <<= 6;
      |             ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:66:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
   66 |             case 4: output += static_cast<Uint8>(*begin++); output <<= 6;
      |                                                             ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:67:13: note: here
   67 |             case 3: output += static_cast<Uint8>(*begin++); output <<= 6;
      |             ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:67:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
   67 |             case 3: output += static_cast<Uint8>(*begin++); output <<= 6;
      |                                                             ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:68:13: note: here
   68 |             case 2: output += static_cast<Uint8>(*begin++); output <<= 6;
      |             ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:68:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
   68 |             case 2: output += static_cast<Uint8>(*begin++); output <<= 6;
      |                                                             ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:69:13: note: here
   69 |             case 1: output += static_cast<Uint8>(*begin++); output <<= 6;
      |             ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:69:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
   69 |             case 1: output += static_cast<Uint8>(*begin++); output <<= 6;
      |                                                             ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:70:13: note: here
   70 |             case 0: output += static_cast<Uint8>(*begin++);
      |             ^~~~
g++ -O2 -march=native -Wall -Wextra -pedantic -std=c++23 -L /usr/local/lib/SFML-2.5.1/lib -I /usr/local/lib/SFML-2.5.1/include build/Editor.o build/src/Cursor.o build/src/EditorContent.o build/src/EditorView.o build/src/ImplementationUtils.o build/src/InputController.o build/src/SelectionData.o build/src/SpecialChars.o build/src/TextDocument.o -o build/editor -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: build/src/EditorView.o: in function `EditorView::EditorView(sf::RenderWindow const&, sf::String const&, EditorContent&)':
EditorView.cpp:(.text+0x863): undefined reference to `sf::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
/usr/bin/ld: build/src/SpecialChars.o: in function `SpecialChars::convertSpecialChar[abi:cxx11](unsigned int, std::basic_ofstream<char, std::char_traits<char> >&)':
SpecialChars.cpp:(.text+0x3e): undefined reference to `sf::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: build/editor] Error 1

Licencia (License)

what is the free use license for the project?
cual es la licencia de uso gratis para tu proyecta?
podes poner la licencia en el read me?

Editor wierd behavior after pressing right arrow key at end of text

There is a small bug, when you try to move cursor to right (via arrow keys) at the end of text - it results in std::out_of_range error.
This will also cause weird behavior where in newline characters will start appearing in the all the lines written so far.

Steps to reproduce Issue -

  • Type multiple lines in editor.
  • Move to last line and press the right arrow key
  • Now try entering text - text starts to appear on all lines
  • Inserting new line characters with a mix of normal characters may crash the program (unable to determine exact steps).

The bug is likely in moveCursorRight method implementation of EditorContent.cpp.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.