all repos — fluxbox @ 0e8c41821002489811317874d941e519b683cfea

custom fork of the fluxbox windowmanager

fixed fbrun crash when history item is bigger than entry box, sf: [ 1005182 ] fix for Bug with RequestID #877004, patch from mangala
fluxgen fluxgen
commit

0e8c41821002489811317874d941e519b683cfea

parent

3c8e7ae95a85f8e84bb6b4690c11956177a0710f

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/FbTk/TextBox.ccsrc/FbTk/TextBox.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: TextBox.cc,v 1.10 2004/07/15 13:48:54 fluxgen Exp $ +// $Id: TextBox.cc,v 1.11 2004/08/11 12:41:28 fluxgen Exp $ #include "TextBox.hh" #include "Font.hh"

@@ -278,7 +278,10 @@ }

} void TextBox::adjustStartPos() { - int text_width = font().textWidth(text().c_str() + m_start_pos, m_end_pos - m_start_pos); + // reset global start po + m_start_pos = 0; + + int text_width = font().textWidth(text().c_str(), m_end_pos); if (text_width < static_cast<signed>(width())) return;